Interface Attribute
-
- All Superinterfaces:
Immutable<Attribute,MutableAttribute>
- All Known Subinterfaces:
MutableAttribute
- All Known Implementing Classes:
AttributeImpl
,MutableAttributeImpl
public interface Attribute extends Immutable<Attribute,MutableAttribute>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CLASS_ATTR
static java.lang.String
ID_ATTR
static java.lang.String
LINK_STATUS_ATTR
static java.lang.String
NAME_ATTR
static Attribute
NO_FOLLOW
static java.util.Set<java.lang.String>
NON_RENDERING_WHEN_EMPTY
static char
NUL
Deprecated.static java.lang.String
STYLE_ATTR
static java.lang.String
TARGET_ATTR
static java.lang.String
TITLE_ATTR
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsValue(java.lang.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 setjava.lang.String
getName()
java.lang.String
getValue()
char
getValueListDelimiter()
char
getValueNameDelimiter()
boolean
isNonRendering()
Attribute
removeValue(java.lang.CharSequence value)
Add a new value or values depending on list and name delimiter settings and value content.Attribute
replaceValue(java.lang.CharSequence value)
Replace the complete value of this attribute by a new valueAttribute
setValue(java.lang.CharSequence value)
Add a new value or values depending on list and name delimiter settings and value content
-
-
-
Field Detail
-
CLASS_ATTR
static final java.lang.String CLASS_ATTR
- See Also:
- Constant Field Values
-
ID_ATTR
static final java.lang.String ID_ATTR
- See Also:
- Constant Field Values
-
LINK_STATUS_ATTR
static final java.lang.String LINK_STATUS_ATTR
- See Also:
- Constant Field Values
-
NAME_ATTR
static final java.lang.String NAME_ATTR
- See Also:
- Constant Field Values
-
STYLE_ATTR
static final java.lang.String STYLE_ATTR
- See Also:
- Constant Field Values
-
TITLE_ATTR
static final java.lang.String TITLE_ATTR
- See Also:
- Constant Field Values
-
TARGET_ATTR
static final java.lang.String TARGET_ATTR
- See Also:
- Constant Field Values
-
NO_FOLLOW
static final Attribute NO_FOLLOW
-
NON_RENDERING_WHEN_EMPTY
static final java.util.Set<java.lang.String> NON_RENDERING_WHEN_EMPTY
-
NUL
@Deprecated static final char NUL
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
-
getValue
java.lang.String getValue()
-
getValueListDelimiter
char getValueListDelimiter()
-
getValueNameDelimiter
char getValueNameDelimiter()
-
isNonRendering
boolean isNonRendering()
-
containsValue
boolean containsValue(java.lang.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
- name part of the attribute value list or the value if the attribute does not have a value list delimiter- Returns:
- true if the attribute contains the valueName
-
replaceValue
Attribute replaceValue(java.lang.CharSequence value)
Replace the complete value of this attribute by a new value- Parameters:
value
- new value- Returns:
- new attribute or same attribute if nothing changed or attribute is mutable
-
setValue
Attribute setValue(java.lang.CharSequence value)
Add a new value or values depending on list and name delimiter settings and value contentIf 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
- value or list of values (if attribute has a list delimiter and name delimiter) to change- Returns:
- new attribute or same attribute if nothing changed or attribute is mutable
-
removeValue
Attribute removeValue(java.lang.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
- value or list of values (if attribute has a list delimiter and name delimiter) to remove- Returns:
- new attribute or same attribute if nothing changed or attribute is mutable
-
-