Class: javax.management.AttributeList
Represents a list of values for attributes of an MBean. The methods
used for the insertion of 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.Inheritance
Superclass tree:- java.lang.Object
- java.util.AbstractCollection<java.lang.Object>
- java.util.AbstractList<java.lang.Object>
- java.util.ArrayList<java.lang.Object>
- javax.management.AttributeList
Methods
-
AttributeListtop
public AttributeList()Constructs an emptyAttributeList. -
AttributeListtop
public AttributeList(int initialCapacity)Constructs an emptyAttributeListwith the initial capacity specified. -
AttributeListtop
Constructs an AttributeList containing the elements of the List specified, in the order in which they are returned by the List's iterator. -
AttributeListtop
public AttributeList(AttributeList list)Constructs anAttributeListcontaining the elements of theAttributeListspecified, in the order in which they are returned by theAttributeList's iterator. TheAttributeListinstance has an initial capacity of 110% of the size of theAttributeListspecified. -
addtop
Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices). -
addtop
public void add(int index, 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. -
addtop
Appends the specified element to the end of this list (optional operation).Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.
- Override hierarchy:
- add from ArrayList<Object>
- add from AbstractList<Object>
- add from AbstractCollection<Object>
-
addtop
public void add(Attribute object)Adds the Attribute specified as the last element of the list. -
addAlltop
public boolean addAll(int index, Collection<?> c)Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.) -
addAlltop
public boolean addAll(int index, AttributeList list)Inserts all of the elements in theAttributeListspecified 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. -
addAlltop
public 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 (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.) -
addAlltop
public boolean addAll(AttributeList list)Appends all the elements in theAttributeListspecified to the end of the list, in the order in which they are returned by the Iterator of theAttributeListspecified. -
asListtop
Return a view of this list as a List<Attribute>. Changes to the returned value are reflected by changes to the original AttributeList and vice versa. -
settop
Replaces the element at the specified position in this list with the specified element (optional operation). -
settop
public void set(int index, 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.
