AttributeListpublic class AttributeList extends ArrayList Represents a list of values for attributes of an
MBean. The methods used for the insertion of {@link javax.management.Attribute Attribute} objects in
the AttributeList overrides the corresponding methods in the superclass
ArrayList . This is needed in order to insure that the objects contained
in the AttributeList are only Attribute objects. This avoids getting
an exception when retrieving elements from the AttributeList . |
Fields Summary |
---|
private static final long | serialVersionUID |
Constructors Summary |
---|
public AttributeList()Constructs an empty AttributeList .
super();
| public AttributeList(int initialCapacity)Constructs an empty AttributeList with the initial capacity specified.
super(initialCapacity);
| public AttributeList(AttributeList list)Constructs an AttributeList containing the elements of the AttributeList specified,
in the order in which they are returned by the AttributeList 's iterator.
The AttributeList instance has an initial capacity of 110% of the
size of the AttributeList specified.
super(list);
|
Methods Summary |
---|
public void | add(javax.management.Attribute object)Adds the Attribute specified as the last element of the list.
super.add(object);
| public void | add(int index, javax.management.Attribute object)Inserts the attribute specified as an element at the position specified.
Elements with an index greater than or equal to the current position are
shifted up. If the index is out of range (index < 0 || index >
size() a RuntimeOperationsException should be raised, wrapping the
java.lang.IndexOutOfBoundsException thrown.
try {
super.add(index, object);
}
catch (IndexOutOfBoundsException e) {
throw (new RuntimeOperationsException(e, "The specified index is out of range"));
}
| public boolean | addAll(javax.management.AttributeList list)Appends all the elements in the AttributeList specified to the end
of the list, in the order in which they are returned by the Iterator of
the AttributeList specified.
return (super.addAll(list));
| public boolean | addAll(int index, javax.management.AttributeList list)Inserts all of the elements in the AttributeList specified into this
list, starting at the specified position, in the order in which they
are returned by the Iterator of the AttributeList specified. If
the index is out of range (index < 0 || index > size() a RuntimeOperationsException should
be raised, wrapping the java.lang.IndexOutOfBoundsException thrown.
try {
return(super.addAll(index, list));
}
catch (IndexOutOfBoundsException e) {
throw (new RuntimeOperationsException(e, "The specified index is out of range"));
}
| public void | set(int index, javax.management.Attribute object)Sets the element at the position specified to be the attribute specified.
The previous element at that position is discarded. If the index is
out of range (index < 0 || index > size() a RuntimeOperationsException should
be raised, wrapping the java.lang.IndexOutOfBoundsException thrown.
try {
super.set(index, object);
}
catch (IndexOutOfBoundsException e) {
throw (new RuntimeOperationsException(e, "The specified index is out of range"));
}
|
|