Public Member Functions | |
AttributeList (Element parent) | |
boolean | add (Object obj) |
void | add (int index, Object obj) |
boolean | addAll (Collection collection) |
boolean | addAll (int index, Collection collection) |
void | clear () |
void | clearAndSet (Collection collection) |
Object | get (int index) |
Object | remove (int index) |
Object | set (int index, Object obj) |
int | size () |
String | toString () |
Protected Member Functions | |
void | add (int index, Attribute attribute) |
void | ensureCapacity (int minCapacity) |
Object | get (String name, Namespace namespace) |
int | indexOf (String name, Namespace namespace) |
boolean | remove (String name, Namespace namespace) |
Object | set (int index, Attribute attribute) |
Protected Attributes | |
Element | parent |
AttributeList
represents legal JDOM Attribute
content. This class is NOT PUBLIC; users should see it as a simple List implementation.
org::jdom::AttributeList::AttributeList | ( | Element | parent | ) | [inline] |
Create a new instance of the AttributeList representing Element content
boolean org::jdom::AttributeList::add | ( | Object | obj | ) | [inline] |
void org::jdom::AttributeList::add | ( | int | index, | |
Object | obj | |||
) | [inline] |
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).
index | The location to set the value to. | |
obj | The object to insert into the list. throws IndexOutOfBoundsException if index < 0 || index > size() |
void org::jdom::AttributeList::add | ( | int | index, | |
Attribute | attribute | |||
) | [inline, protected] |
boolean org::jdom::AttributeList::addAll | ( | Collection | collection | ) | [inline] |
Add all the objects in the specified collection.
collection | The collection containing all the objects to add. |
true
if the list was modified as a result of the add. boolean org::jdom::AttributeList::addAll | ( | int | index, | |
Collection | collection | |||
) | [inline] |
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).
index | The offset to start adding the data in the collection | |
collection | The collection to insert into the list. |
true
if the list was modified as a result of the add. throws IndexOutOfBoundsException if index < 0 || index > size() void org::jdom::AttributeList::clear | ( | ) | [inline] |
Clear the current list.
void org::jdom::AttributeList::clearAndSet | ( | Collection | collection | ) | [inline] |
Clear the current list and set it to the contents of the Collection
. object.
collection | The collection to use. |
void org::jdom::AttributeList::ensureCapacity | ( | int | minCapacity | ) | [inline, protected] |
Increases the capacity of this AttributeList
instance, if necessary, to ensure that it can hold at least the number of items specified by the minimum capacity argument.
minCapacity | the desired minimum capacity. |
Object org::jdom::AttributeList::get | ( | int | index | ) | [inline] |
Return the object at the specified offset.
index | The offset of the object. |
Object org::jdom::AttributeList::get | ( | String | name, | |
Namespace | namespace | |||
) | [inline, protected] |
int org::jdom::AttributeList::indexOf | ( | String | name, | |
Namespace | namespace | |||
) | [inline, protected] |
Return index of the Attribute
with the given name and uri.
Object org::jdom::AttributeList::remove | ( | int | index | ) | [inline] |
Remove the object at the specified offset.
index | The offset of the object. |
boolean org::jdom::AttributeList::remove | ( | String | name, | |
Namespace | namespace | |||
) | [inline, protected] |
Object org::jdom::AttributeList::set | ( | int | index, | |
Object | obj | |||
) | [inline] |
Set the object at the specified location to the supplied object.
index | The location to set the value to. | |
obj | The location to set the value to. |
Object org::jdom::AttributeList::set | ( | int | index, | |
Attribute | attribute | |||
) | [inline, protected] |
Set the object at the specified location to the supplied object. Note: does not check for duplicate attributes.
index | The location to set the value to. | |
attribute | The attribute to set. |
int org::jdom::AttributeList::size | ( | ) | [inline] |
Return the number of items in this list
String org::jdom::AttributeList::toString | ( | ) | [inline] |
Return this list as a String
Element org::jdom::AttributeList::parent [protected] |
The parent Element