All Packages Class Hierarchy This Package Previous Next Index
Interface vnet.markup.AttributeList
- public interface AttributeList
A list of Element attributes. The list may be unordered.
Note: vnet.markup classes are not thread safe. Locking
must be performed by the application.
-
add(Attribute)
- Appends the given Attribute to the list.
-
add(AttributeList)
- Concatenates this and the given AttributeList.
-
getAttribute(int)
- Returns the attribute at the given index.
-
getAttribute(String)
- Returns the attribute with the given name.
-
remove(Attribute)
- Removed the given Attribute from the list.
-
size()
- The size of the list.
add
public abstract void add(Attribute attr)
- Appends the given Attribute to the list. Replaces any Attribute with the
same name.
- Parameters:
- attr - the Attribute to be appended.
add
public abstract void add(AttributeList attrs)
- Concatenates this and the given AttributeList. Any duplicate Attributes
in
attrs
will replace existing Attributes in this list.
- Parameters:
- attrs - the additional AttributeList.
size
public abstract int size()
- The size of the list.
- Returns:
- The number of attributes in this list.
getAttribute
public abstract Attribute getAttribute(String name)
- Returns the attribute with the given name.
- Parameters:
- name - the name of the attribute to be returned.
- Returns:
- The named Attribute or null if no match is found.
getAttribute
public abstract Attribute getAttribute(int index) throws ArrayIndexOutOfBoundsException
- Returns the attribute at the given index.
Note: If Attributes are added to or removed from
the list, the ordering of Attributes in the list may change. This
method and size() are indeded to allow quick iteration through the
list, not to keep track of the location of specific Attributes in
the list.
- Parameters:
- index - the location of the Attribute to be returned.
- Returns:
- The named Attribute or null if no match is found.
- Throws: ArrayIndexOutOfBoundsException
- if an invalid index was given.
remove
public abstract void remove(Attribute attr)
- Removed the given Attribute from the list.
- Parameters:
- attr - the Attribute to be removed.
All Packages Class Hierarchy This Package Previous Next Index