| java.util.AbstractList org.jdom.AttributeList
Method Summary | |
public boolean | add(Object obj) Add a attribute to the end of the list or replace a existing
attribute with the same name and Namespace .
Parameters: obj - The object to insert into the list. | public void | add(int index, Object obj) Inserts the specified attribute at the specified position in this list. | void | add(int index, Attribute attribute) Check and add the Attribute to this list at
the given index. | public boolean | addAll(Collection collection) Add all the objects in the specified collection.
Parameters: collection - The collection containing all the objects to add. | public boolean | addAll(int index, Collection collection) Inserts the specified collecton at the specified position in this list.
Shifts the attribute currently at that position (if any) and any
subsequent attributes to the right (adds one to their indices).
Parameters: index - The offset to start adding the data in the collection Parameters: collection - The collection to insert into the list. | public void | clear() Clear the current list. | void | clearAndSet(Collection collection) Clear the current list and set it to the contents
of the Collection . | public Object | get(int index) Return the object at the specified offset.
Parameters: index - The offset of the object. | Object | get(String name, Namespace namespace) Return the Attribute with the
given name and Namespace . | int | indexOf(String name, Namespace namespace) Return index of the Attribute with the
given name and uri. | public Object | remove(int index) Remove the object at the specified offset.
Parameters: index - The offset of the object. | boolean | remove(String name, Namespace namespace) Remove the Attribute with the
given name and Namespace . | public Object | set(int index, Object obj) Set the object at the specified location to the supplied
object.
Parameters: index - The location to set the value to. Parameters: obj - The location to set the value to. | Object | set(int index, Attribute attribute) Set the object at the specified location to the supplied
object. | public int | size() | public String | toString() | final void | uncheckedAddAttribute(Attribute a) Package internal method to support building from sources that are
100% trusted. |
AttributeList | AttributeList(Element parent)(Code) | | Create a new instance of the AttributeList representing
Element content
Parameters: parent - element whose attributes are to be held |
add | public boolean add(Object obj)(Code) | | Add a attribute to the end of the list or replace a existing
attribute with the same name and Namespace .
Parameters: obj - The object to insert into the list. true (as per the general contract of Collection.add). throws: IndexOutOfBoundsException - if index < 0 || index > size() |
add | public void add(int index, Object obj)(Code) | | Inserts the specified attribute at the specified position in this list.
Shifts the attribute currently at that position (if any) and any
subsequent attributes to the right (adds one to their indices).
Parameters: index - The location to set the value to. Parameters: obj - The object to insert into the list.throws IndexOutOfBoundsException if index < 0 || index > size() |
add | void add(int index, Attribute attribute)(Code) | | Check and add the Attribute to this list at
the given index. Note: does not check for duplicate
attributes.
Parameters: index - index where to add Attribute Parameters: attribute - Attribute to add |
addAll | public boolean addAll(Collection collection)(Code) | | Add all the objects in the specified collection.
Parameters: collection - The collection containing all the objects to add. true if the list was modified as a result ofthe add. |
addAll | public boolean addAll(int index, Collection collection)(Code) | | Inserts the specified collecton at the specified position in this list.
Shifts the attribute currently at that position (if any) and any
subsequent attributes to the right (adds one to their indices).
Parameters: index - The offset to start adding the data in the collection Parameters: collection - The collection to insert into the list. true if the list was modified as a result ofthe add.throws IndexOutOfBoundsException if index < 0 || index > size() |
clear | public void clear()(Code) | | Clear the current list.
|
clearAndSet | void clearAndSet(Collection collection)(Code) | | Clear the current list and set it to the contents
of the Collection .
object.
Parameters: collection - The collection to use. |
get | public Object get(int index)(Code) | | Return the object at the specified offset.
Parameters: index - The offset of the object. The Object which was returned. |
get | Object get(String name, Namespace namespace)(Code) | | Return the Attribute with the
given name and Namespace .
Parameters: name - name of attribute to return Parameters: namespace - Namespace to match the Attribute , or null if one doesn't exist. |
indexOf | int indexOf(String name, Namespace namespace)(Code) | | Return index of the Attribute with the
given name and uri.
|
remove | public Object remove(int index)(Code) | | Remove the object at the specified offset.
Parameters: index - The offset of the object. The Object which was removed. |
remove | boolean remove(String name, Namespace namespace)(Code) | | Remove the Attribute with the
given name and Namespace .
Parameters: namespace - Namespace to match the true if attribute was removed,false otherwise |
set | public Object set(int index, Object obj)(Code) | | Set the object at the specified location to the supplied
object.
Parameters: index - The location to set the value to. Parameters: obj - The location to set the value to. The object which was replaced.throws IndexOutOfBoundsException if index < 0 || index >= size() |
set | Object set(int index, Attribute attribute)(Code) | | Set the object at the specified location to the supplied
object. Note: does not check for duplicate attributes.
Parameters: index - The location to set the value to. Parameters: attribute - The attribute to set. The object which was replaced.throws IndexOutOfBoundsException if index < 0 || index >= size() |
size | public int size()(Code) | | Return the number of items in this list
The number of items in this list. |
toString | public String toString()(Code) | | Return this list as a String
|
uncheckedAddAttribute | final void uncheckedAddAttribute(Attribute a)(Code) | | Package internal method to support building from sources that are
100% trusted.
Parameters: a - attribute to add without any checks |
Fields inherited from java.util.AbstractList | protected transient int modCount(Code)(Java Doc)
|
|
|