Class Attributes
java.lang.Object
org.exoplatform.social.common.xmlprocessor.model.Attributes
The attributes of an Node.
Attributes are treated as a map: there can be only one value associated with an attribute key.
Attribute key and value comparisons are done case insensitively, and keys are normalised to lower-case.
Attributes are treated as a map: there can be only one value associated with an attribute key.
Attribute key and value comparisons are done case insensitively, and keys are normalised to lower-case.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all attributesGets an attribute value by key.Gets the KeySet iterator of attributesbooleanChecks if these attributes contain an attribute with this key.voidSets a new attribute, or replace an existing one by key.voidRemoves an attribute by key.intsize()Get the number of attributes in this set.toString()Converts to string xml presentation of this attributes.
-
Constructor Details
-
Attributes
public Attributes()
-
-
Method Details
-
get
Gets an attribute value by key.- Parameters:
key- the attribute key- Returns:
- the attribute value if set; or empty string if not set.
- See Also:
-
put
Sets a new attribute, or replace an existing one by key.- Parameters:
key- attribute keyvalue- attribute value
-
remove
Removes an attribute by key.- Parameters:
key- attribute key to remove
-
hasKey
Checks if these attributes contain an attribute with this key.- Parameters:
key- key to be checked- Returns:
- true if key exists, false otherwise
-
size
public int size()Get the number of attributes in this set.- Returns:
- size
-
getKeyIterator
Gets the KeySet iterator of attributes- Returns:
- iterator of keys
-
clear
public void clear()Clears all attributes -
toString
Converts to string xml presentation of this attributes.
-