Libraries anvil naming Attributes

class Attributes
extends anvil.lang.object
This class represents a collection of attributes.

Constructor
Attributes(attribute, ...)
Attributes(boolean ignoreCase, attribute, ...)
Parameters attributes -  Map (id=>value) or instance of Attribute


Methods

Attribute get(String id)
Returns the attribute given id
Returns Attribute or undefined

iterator getAll()
Returns the iterator of Attributes in this set.

iterator getIDs()
Returns the numeration of ID's from this set.

boolean isCaseIgnored()
Determines whether the attribute set ignores the case of attribute identifiers when retrieving or adding attributes.

Attribute put(String id, Any value)
Attribute put(Attribute attr)
Puts a new attribute to this set.
Parameters id -  Id of attribute
value -  Value of attribute
attr -  Atttribut eto add
Returns Attribute that was replaced, or undefined

Attribute remove(String id)
Removes attribute with give id.
Returns Removed Attribute or undefined

int size()
Return the number of attributes in this set.


Attributes

Attribute Attributes.attrId
Retrieves given attribute.
delete Attributes.attrId
Removes given attribute.
Parameters attrId -  ID of attribute to retrieve
Returns Attribute or undefined if no such attribute exist.


References

Attribute Attributes[attrId]
Retrieves given attribute.
delete Attributes[attrId]
Removes given attribute.
Parameters attrId -  ID of attribute to retrieve
Returns Attribute or undefined if no such attribute exist.


Operators

Attributes[] = element
Adds a new value to this attribute.
Parameters element -  Element to add, either instance of Attribute or id=>element map.