javax.management
public class AttributeList extends ArrayList<Object>
Attribute
s, with their
names and values. This is implemented as an
ArrayList
extension, with additional
methods typed to only allow the addition of Attribute
s.modCount
Constructor and Description |
---|
AttributeList()
Constructs an empty list with an initial capacity of ten.
|
AttributeList(AttributeList list)
Constructs an
AttributeList using the contents
of an existing list. |
AttributeList(int capacity)
Constructs an empty list with the specified initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Attribute attribute)
Adds the specified
Attribute to the end of the list. |
void |
add(int index,
Attribute attribute)
Adds the specified
Attribute at the supplied index. |
boolean |
addAll(AttributeList list)
|
boolean |
addAll(int index,
AttributeList list)
Adds all the
Attribute s from the supplied list
to this list, at the specified index. |
void |
set(int index,
Attribute attribute)
Replaces the attribute at the specified index with the one
supplied.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
equals, hashCode, iterator, listIterator, listIterator, subList
containsAll, remove, removeAll, retainAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
public AttributeList()
ArrayList.ArrayList()
public AttributeList(AttributeList list)
AttributeList
using the contents
of an existing list. The initial capacity is 110% of the
size of the specified list.list
- the list to use to fill this list.ArrayList.ArrayList(java.util.Collection)
public AttributeList(int capacity)
capacity
- the initial capacity of the list.ArrayList.ArrayList(int)
public void add(Attribute attribute)
Attribute
to the end of the list.attribute
- the attribute to add.java.util.Arraylist#add(Object)
public void add(int index, Attribute attribute)
Adds the specified Attribute
at the supplied index.
Any attribute already at that index is moved up one place
in the list to the position (index + 1)
.
Likewise, the attribute at (index + 1)
is
also moved up one place, continuing until the final
attribute in the list moves to a new position, increasing
the size of the list.
If the index is invalid (i.e. it is smaller than zero, or greater than the current size of the list), a
index
- the index at which to place the new attribute.attribute
- the new attribute to add.RuntimeOperationsException
- if index < 0
or index > size()
ArrayList.add(int, Object)
public boolean addAll(AttributeList list)
Attribute
s from the supplied list
to the end of this list, in the order they are returned
by the list's Iterator
.list
- the list of attributes to add.ArrayList.addAll(Collection)
public boolean addAll(int index, AttributeList list)
Adds all the Attribute
s from the supplied list
to this list, at the specified index. The attributes
are added in the order they are returned by the
list's Iterator
. Any attribute already
at that index is moved up one place in the list to the
position (index + list.size())
.
Likewise, the attribute at (index + list.size())
is also moved up one place, continuing until the final
attribute in the original list.
If the index is invalid (i.e. it is smaller than zero, or greater than the current size of the list), a
index
- the index at which to place the new attribute.list
- the list of attributes to add.RuntimeOperationsException
- if index < 0
or index > size()
ArrayList.addAll(int, Collection)
public void set(int index, Attribute attribute)
index
- the index at which to place the new attribute.attribute
- the new attribute to add.RuntimeOperationsException
- if index < 0
or index > size()
ArrayList.set(int, Object)