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.


Method Index

 o add(Attribute)
Appends the given Attribute to the list.
 o add(AttributeList)
Concatenates this and the given AttributeList.
 o getAttribute(int)
Returns the attribute at the given index.
 o getAttribute(String)
Returns the attribute with the given name.
 o remove(Attribute)
Removed the given Attribute from the list.
 o size()
The size of the list.

Methods

 o 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.
 o 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.
 o size
 public abstract int size()
The size of the list.

Returns:
The number of attributes in this list.
 o 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.
 o 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.
 o 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