AttributeList represents legal JDOM Attribute
content. This class is NOT PUBLIC; users should see it as a simple List
implementation.
CDATA, Comment, Element, EntityRef, ProcessingInstruction, Text
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private Attribute[] | elementData
The backing list |
| private static final int | |
| private Element | parent
The parent Element |
| private int |
| Access | Constructor and Description |
|---|---|
| private | |
| pack-priv | AttributeList(Element
element whose attributes are to be held parent)Create a new instance of the AttributeList representing Element content |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true (as per the general contract of Collection.add).The object to insert into the list. obj)Overrides java. Implements java. Namespace.
|
| public void | add(int
The location to set the value to. index, Object The object to insert into the list.
throws IndexOutOfBoundsException if index < 0 || index > size() obj)Overrides java. Implements java. |
| pack-priv void | add(int
index where to add index, Attribute AttributeAttribute to addOverrides java. Implements java. Attribute to this list at
the given index.
|
| public boolean | Returns: true if the list was modified as a result of
the add.The collection containing all the objects to add. collection)Overrides java. Implements java. |
| public boolean | Returns: true if the list was modified as a result of
the add.
throws IndexOutOfBoundsException if index < 0 || index > size()The offset to start adding the data in the collection index, Collection<E> The collection to insert into the list. collection)Overrides java. Implements java. |
| public void | clear()
Overrides java. Implements java. |
| pack-priv void | clearAndSet(Collection<E>
The collection to use. collection)Clear the current list and set it to the contents
of the |
| private void | ensureCapacity(int
the desired minimum capacity. minCapacity)Increases the capacity of this |
| public Object | Returns: The Object which was returned.The offset of the object. index)Implements abstract java. Implements java. |
| pack-priv Object | |
| pack-priv int | |
| private int | indexOfDuplicate(Attribute attribute)
Return index of attribute with same name and Namespace, or -1 if one doesn't exist |
| public Object | Returns: The Object which was removed.The offset of the object. index)Overrides java. Implements java. |
| pack-priv boolean | |
| public Object | Returns: The object which was replaced. throws IndexOutOfBoundsException if index < 0 || index >= size()The location to set the value to. index, Object The location to set the value to. obj)Overrides java. Implements java. |
| pack-priv Object | Returns: The object which was replaced. throws IndexOutOfBoundsException if index < 0 || index >= size()The location to set the value to. index, Attribute The attribute to set. attribute)Overrides java. Implements java. |
| public int | Returns: The number of items in this list.Implements abstract java. Implements java. |
| public String | |
| pack-priv final void | uncheckedAddAttribute(Attribute
attribute to add without any checks a)Package internal method to support building from sources that are 100% trusted. |
| CVS_ID | back to summary |
|---|---|
| private static final String CVS_ID | |
| elementData | back to summary |
|---|---|
| private Attribute[] elementData The backing list | |
| INITIAL_ARRAY_SIZE | back to summary |
|---|---|
| private static final int INITIAL_ARRAY_SIZE | |
| parent | back to summary |
|---|---|
| private Element parent The parent Element | |
| size | back to summary |
|---|---|
| private int size | |
| AttributeList | back to summary |
|---|---|
| private AttributeList() Force an Element parent | |
| AttributeList | back to summary |
|---|---|
| pack-priv AttributeList(Element parent) Create a new instance of the AttributeList representing Element content
| |
| add | back to summary |
|---|---|
| public boolean add(Object obj) Overrides java. Implements java. Add a attribute to the end of the list or replace a existing
attribute with the same name and
| |
| add | back to summary |
|---|---|
| public void add(int index, Object obj) Overrides java. Implements java. 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).
| |
| add | back to summary |
|---|---|
| pack-priv void add(int index, Attribute attribute) Overrides java. Implements java. Check and add the Note does not check for duplicate attributes.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(Collection<E> collection) Overrides java. Implements java. Add all the objects in the specified collection.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(int index, Collection<E> collection) Overrides java. Implements java. 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).
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Implements java. Clear the current list. | |
| clearAndSet | back to summary |
|---|---|
| pack-priv void clearAndSet(Collection<E> collection) Clear the current list and set it to the contents
of the
| |
| ensureCapacity | back to summary |
|---|---|
| private void ensureCapacity(int minCapacity) Increases the capacity of this
| |
| get | back to summary |
|---|---|
| public Object get(int index) Implements abstract java. Implements java. Return the object at the specified offset.
| |
| get | back to summary |
|---|---|
| pack-priv Object get(String name, Namespace namespace) Return the | |
| indexOf | back to summary |
|---|---|
| pack-priv int indexOf(String name, Namespace namespace) Return index of the | |
| indexOfDuplicate | back to summary |
|---|---|
| private int indexOfDuplicate(Attribute attribute) Return index of attribute with same name and Namespace, or -1 if one doesn't exist | |
| remove | back to summary |
|---|---|
| public Object remove(int index) Overrides java. Implements java. Remove the object at the specified offset.
| |
| remove | back to summary |
|---|---|
| pack-priv boolean remove(String name, Namespace namespace) Remove the
| |
| set | back to summary |
|---|---|
| public Object set(int index, Object obj) Overrides java. Implements java. Set the object at the specified location to the supplied object. | |
| set | back to summary |
|---|---|
| pack-priv Object set(int index, Attribute attribute) Overrides java. Implements java. Set the object at the specified location to the supplied object. Note does not check for duplicate attributes. | |
| size | back to summary |
|---|---|
| public int size() Implements abstract java. Implements java. Return the number of items in this list
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return this list as a
| |
| uncheckedAddAttribute | back to summary |
|---|---|
| pack-priv final void uncheckedAddAttribute(Attribute a) Package internal method to support building from sources that are 100% trusted.
| |