| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
AttributeList list = new AttributeList();
Based on 58 examples
public 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
.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Constructs an empty AttributeList .
|
|
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.
|
|
AttributeList(int initialCapacity) Constructs an empty AttributeList with
the initial capacity specified.
|
|
AttributeList(List list) Constructs an containing the elements of the specified, in the order in which they are returned by the 's iterator. |
Method Summary | |
---|---|
void |
Adds the specified as the last element of the list. |
void |
Inserts the attribute specified as an element at the position specified. |
void |
Appends the specified element to the end of this list. |
boolean |
Appends the specified element to the end of this list. |
boolean |
addAll(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.
|
boolean |
addAll(Collection c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator. |
boolean |
addAll(int index, 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 specified.
|
boolean |
addAll(int index, Collection c) Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator. |
List |
asList() Return a view of this list as a . |
void |
Sets the element at the position specified to be the attribute specified. |
Object |
Replaces the element at the specified position in this list with the specified element. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, sort, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeList()
AttributeList
.
public AttributeList(AttributeList list)
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.
list
- the AttributeList
that defines the initial
contents of the new AttributeList
.public AttributeList(int initialCapacity)
AttributeList
with
the initial capacity specified.
initialCapacity
- the initial capacity of the
AttributeList
, as specified by {@link
ArrayList#ArrayList(int)}.public AttributeList(List list)
list
- the {@code List} that defines the initial contents of
the new {@code AttributeList}.Method Detail |
---|
public void add(Attribute object)
object
- The attribute to be added.public void add(int index, Attribute object)
index
- The position in the list where the new {@code Attribute}
object is to be inserted.object
- The Attribute
object to be inserted.public void add(int index, Object element)
add
in class ArrayList
index
element
public boolean add(Object o)
add
in class ArrayList
o
public boolean addAll(AttributeList list)
AttributeList
specified to
the end of the list, in the order in which they are returned by the
Iterator of the AttributeList
specified.
list
- Elements to be inserted into the list.public boolean addAll(Collection c)
addAll
in class ArrayList
c
public boolean addAll(int index, AttributeList list)
AttributeList
specified
into this list, starting at the specified position, in the order in which
they are returned by the Iterator of the {@code AttributeList} specified.
If the index is out of range (index < 0 || index > size() a
RuntimeOperationsException should be raised, wrapping the
java.lang.IndexOutOfBoundsException thrown.
index
- Position at which to insert the first element from the
AttributeList
specified.list
- Elements to be inserted into the list.public boolean addAll(int index, Collection c)
addAll
in class ArrayList
index
c
public List asList()
If this method has ever been called on a given {@code AttributeList} instance, a subsequent attempt to add an object to that instance which is not an {@code Attribute} will fail with a {@code IllegalArgumentException}. For compatibility reasons, an {@code AttributeList} on which this method has never been called does allow objects other than {@code Attribute}s to be added.
public void set(int index, Attribute object)
index
- The position specified.object
- The value to which the attribute element should be set.public Object set(int index, Object element)
set
in class ArrayList
index
element
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |