Top Fields Methods
com.vladsch.flexmark.util.html

public Interface Attribute

extends Immutable<Attribute, MutableAttribute>
Known Direct Subinterfaces
com.vladsch.flexmark.util.html.MutableAttribute
Known Direct Implementers
com.vladsch.flexmark.util.html.AttributeImpl
Imports
com.vladsch.flexmark.util.misc.Immutable, com.vladsch.flexmark.util.sequence.SequenceUtils, java.util.Arrays, .HashSet, .Set

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String
public static final Attribute
public static final Set<String>
public static final char
NUL

Deprecated
public static final String
public static final String
public static final String

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the attribute contains the valueName
containsValue
(CharSequence
name part of the attribute value list or the value if the attribute does not have a value list delimiter
value
)

See if the attribute contains the value (if attribute has list delimiter set) or is equal to the value if no list delimiter is set

public String
public String
public char
public char
public boolean
public Attribute

Returns:

new attribute or same attribute if nothing changed or attribute is mutable
removeValue
(CharSequence
value or list of values (if attribute has a list delimiter and name delimiter) to remove
value
)

Add a new value or values depending on list and name delimiter settings and value content.

public Attribute

Returns:

new attribute or same attribute if nothing changed or attribute is mutable
replaceValue
(CharSequence
new value
value
)

Replace the complete value of this attribute by a new value

public Attribute

Returns:

new attribute or same attribute if nothing changed or attribute is mutable
setValue
(CharSequence
value or list of values (if attribute has a list delimiter and name delimiter) to change
value
)

Add a new value or values depending on list and name delimiter settings and value content

If the attribute does not have a list delimiter then its value will be set to the given value.

Inherited from com.vladsch.flexmark.util.misc.Immutable:
toMutable

Field Detail

CLASS_ATTRback to summary
public static final String CLASS_ATTR
ID_ATTRback to summary
public static final String ID_ATTR
NAME_ATTRback to summary
public static final String NAME_ATTR
NO_FOLLOWback to summary
public static final Attribute NO_FOLLOW
NON_RENDERING_WHEN_EMPTYback to summary
public static final Set<String> NON_RENDERING_WHEN_EMPTY
NULback to summary
public static final char NUL

Deprecated

Annotations
@Deprecated
STYLE_ATTRback to summary
public static final String STYLE_ATTR
TARGET_ATTRback to summary
public static final String TARGET_ATTR
TITLE_ATTRback to summary
public static final String TITLE_ATTR

Method Detail

containsValueback to summary
public boolean containsValue(CharSequence value)

See if the attribute contains the value (if attribute has list delimiter set) or is equal to the value if no list delimiter is set

Parameters
value:CharSequence

name part of the attribute value list or the value if the attribute does not have a value list delimiter

Returns:boolean

true if the attribute contains the valueName

getNameback to summary
public String getName()
getValueback to summary
public String getValue()
getValueListDelimiterback to summary
public char getValueListDelimiter()
getValueNameDelimiterback to summary
public char getValueNameDelimiter()
isNonRenderingback to summary
public boolean isNonRendering()
removeValueback to summary
public Attribute removeValue(CharSequence value)

Add a new value or values depending on list and name delimiter settings and value content.

If the attribute does not have a list delimiter and its value is equal to the given value then its value is set to empty

If the attribute has a list delimiter but not name delimiter then value will be split by list delimiter and any values in attribute's value list will be removed

If the attribute has a list delimiter and a name delimiter then value will be split by list delimiter and only the name portion of each value will be used for removal from the attribute's value list

Parameters
value:CharSequence

value or list of values (if attribute has a list delimiter and name delimiter) to remove

Returns:Attribute

new attribute or same attribute if nothing changed or attribute is mutable

replaceValueback to summary
public Attribute replaceValue(CharSequence value)

Replace the complete value of this attribute by a new value

Parameters
value:CharSequence

new value

Returns:Attribute

new attribute or same attribute if nothing changed or attribute is mutable

setValueback to summary
public Attribute setValue(CharSequence value)

Add a new value or values depending on list and name delimiter settings and value content

If the attribute does not have a list delimiter then its value will be set to the given value.

If the attribute has a list delimiter but not name delimiter then value will be split by list delimiter and all values will be added to the attribute's value list. New ones added at the end, old ones left as is.

If the attribute has a list delimiter and a name delimiter then value will be split by list delimiter and the name portion of each value will be used to find duplicates whose value will be replaced. New ones added at the end, old ones left where they are but with a new value.

Parameters
value:CharSequence

value or list of values (if attribute has a list delimiter and name delimiter) to change

Returns:Attribute

new attribute or same attribute if nothing changed or attribute is mutable