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.
Since:
@since 1.5

Methods

  • AttributeListtop

    public AttributeList()
    Constructs an empty AttributeList.
    Google Code Search
    Stack Overflow
  • AttributeListtop

    public AttributeList(int initialCapacity)
    Constructs an empty AttributeList with the initial capacity specified.
    Parameters:
    @param initialCapacity the initial capacity of the AttributeList, as specified by java.util.ArrayList.ArrayList(int) .
    Google Code Search
    Stack Overflow
  • AttributeListtop

    public AttributeList(List<Attribute> list)
    Constructs an AttributeList containing the elements of the List specified, in the order in which they are returned by the List's iterator.
    Parameters:
    @param list the List that defines the initial contents of the new AttributeList .
    Exceptions:
    @exception IllegalArgumentException if the list parameter is null or if the list parameter contains any non-Attribute objects.
    See:
    @see java.util.ArrayList.ArrayList(java.util.Collection)
    Since:
    @since 1.6
    Google Code Search
    Stack Overflow
  • AttributeListtop

    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.
    Parameters:
    @param list the AttributeList that defines the initial contents of the new AttributeList.
    See:
    @see java.util.ArrayList.ArrayList(java.util.Collection)
    Google Code Search
    Stack Overflow
  • addtop

    public void add(int index, Object element)
    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).
    Parameters:
    @param index index at which the specified element is to be inserted
    @param element element to be inserted
    Specified by:
    add from List<Object>
    Override hierarchy:
    add from ArrayList<Object>
    add from AbstractList<Object>
    Google Code Search
    Stack Overflow
  • 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.
    Parameters:
    @param object The Attribute object to be inserted.
    @param index The position in the list where the new Attribute object is to be inserted.
    Google Code Search
    Stack Overflow
  • addtop

    public boolean add(Object o)
    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.

    Return:
    @return true (as specified by java.util.Collection.add(java.lang.Object) )
    Specified by:
    add from List<Object>
    add from Collection<Object>
    Override hierarchy:
    add from ArrayList<Object>
    add from AbstractList<Object>
    add from AbstractCollection<Object>
    Google Code Search
    Stack Overflow
  • addtop

    public void add(Attribute object)
    Adds the Attribute specified as the last element of the list.
    Parameters:
    @param object The attribute to be added.
    Google Code Search
    Stack Overflow
  • 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.)
    Parameters:
    @param index index at which to insert the first element from the specified collection
    @param c collection containing elements to be added to this list
    Return:
    @return true if this list changed as a result of the call
    Specified by:
    addAll from List<Object>
    Override hierarchy:
    addAll from ArrayList<Object>
    addAll from AbstractList<Object>
    Google Code Search
    Stack Overflow
  • addAlltop

    public 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 AttributeList specified. If the index is out of range (index < 0 || index > size() a RuntimeOperationsException should be raised, wrapping the java.lang.IndexOutOfBoundsException thrown.
    Parameters:
    @param list Elements to be inserted into the list.
    @param index Position at which to insert the first element from the AttributeList specified.
    Return:
    @return true if this list changed as a result of the call.
    See:
    @see java.util.ArrayList.addAll(int, java.util.Collection)
    Google Code Search
    Stack Overflow
  • 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.)
    Parameters:
    @param c collection containing elements to be added to this list
    Return:
    @return true if this list changed as a result of the call
    Specified by:
    addAll from List<Object>
    addAll from Collection<Object>
    Override hierarchy:
    addAll from ArrayList<Object>
    addAll from AbstractCollection<Object>
    Google Code Search
    Stack Overflow
  • addAlltop

    public 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.
    Parameters:
    @param list Elements to be inserted into the list.
    Return:
    @return true if this list changed as a result of the call.
    See:
    @see java.util.ArrayList.addAll(java.util.Collection)
    Google Code Search
    Stack Overflow
  • asListtop

    public List<Attribute> asList()
    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.
    Return:
    @return a List<Attribute> whose contents reflect the contents of this AttributeList .

    If this method has ever been called on a given AttributeList instance, a subsequent attempt to add an object to that instance which is not an Attribute will fail with a IllegalArgumentException . For compatibility reasons, an AttributeList on which this method has never been called does allow objects other than Attribute s to be added.

    Exceptions:
    @throws IllegalArgumentException if this AttributeList contains an element that is not an Attribute .
    Since:
    @since 1.6
    Google Code Search
    Stack Overflow
  • settop

    public Object set(int index, Object element)
    Replaces the element at the specified position in this list with the specified element (optional operation).
    Parameters:
    @param index index of the element to replace
    @param element element to be stored at the specified position
    Return:
    @return the element previously at the specified position
    Specified by:
    set from List<Object>
    Override hierarchy:
    set from ArrayList<Object>
    set from AbstractList<Object>
    Google Code Search
    Stack Overflow
  • 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.
    Parameters:
    @param object The value to which the attribute element should be set.
    @param index The position specified.
    Google Code Search
    Stack Overflow