public class Attributes extends ReadOnlyAttributes { // Constructors public Attributes(); public Attributes(int elems); public Attributes(ReadOnlyAttributes attrs); public Attributes(Vector v); // Methods public Object put(Name name, Object value); public Object put(Attribute v); public void remove(Name name); public void removeAll(); }
A class that encapsulates a list of attribute/value pairs.
ReadOnlyAttributes | +--Attributes
public Attributes();Construct empty attributes collection.
public Attributes(int elems);Construct attributes collection with given number of empty slots. The collection will grow automatically if you add more than this number.
Parameter Description elems the number of attributes to reserve initially.
public Attributes(ReadOnlyAttributes attrs);Construct attributes collection by copying the passed attributes.
Parameter Description attrs attributes to clone
public Attributes(Vector v);Construct attributes collection using the vector of attributes.
Parameter Description v Attribute vector
public Object put(Name name, Object value);Add a new attribute/value pair, or replace the value for attribute if it already exists.
Return Value
Returns the previous value for the name attribute or null.
public Object put(Attribute v);Add a new attribute or replace the attribute if it already exists.
Return Value
Returns the previous value for the name attribute or null.
public void remove(Name name);Removed the named attribute from the collection.
public void removeAll();