This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.management
class AttributeList

java.lang.Object extended by java.util.AbstractCollection extended by java.util.AbstractList extended by java.util.ArrayList extended by javax.management.AttributeList
All Implemented Interfaces:
Serializable, Cloneable, Collection, List, RandomAccess

Most common way to construct:

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.

          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.

          Constructs an containing the elements of the specified, in the order in which they are returned by the 's iterator.
 
Method Summary
 void
add(Attribute object)

          Adds the specified as the last element of the list.
 void
add(int index, Attribute object)

          Inserts the attribute specified as an element at the position specified.
 void
add(int index, Object element)

          Appends the specified element to the end of this list.
 boolean

          Appends the specified element to the end of this list.
 boolean

          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

          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

          Return a view of this list as a .
 void
set(int index, Attribute object)

          Sets the element at the position specified to be the attribute specified.
 Object
set(int index, Object element)

          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

AttributeList

public AttributeList()
Constructs an empty AttributeList.


AttributeList

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:
list - the AttributeList that defines the initial contents of the new AttributeList.

AttributeList

public AttributeList(int initialCapacity)
Constructs an empty AttributeList with the initial capacity specified.

Parameters:
initialCapacity - the initial capacity of the AttributeList, as specified by {@link ArrayList#ArrayList(int)}.

AttributeList

public AttributeList(List list)
Constructs an {@code AttributeList} containing the elements of the {@code List} specified, in the order in which they are returned by the {@code List}'s iterator.

Parameters:
list - the {@code List} that defines the initial contents of the new {@code AttributeList}.
Method Detail

add

public void add(Attribute object)
Adds the {@code Attribute} specified as the last element of the list.

Parameters:
object - The attribute to be added.

add

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:
index - The position in the list where the new {@code Attribute} object is to be inserted.
object - The Attribute object to be inserted.

add

public void add(int index,
                Object element)
Overrides:
add in class ArrayList
Parameters:
index
element

add

public boolean add(Object o)
Overrides:
add in class ArrayList
Parameters:
o

addAll

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:
list - Elements to be inserted into the list.
Returns:
true if this list changed as a result of the call.

addAll

public boolean addAll(Collection c)
Overrides:
addAll in class ArrayList
Parameters:
c

addAll

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 {@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.

Parameters:
index - Position at which to insert the first element from the AttributeList specified.
list - Elements to be inserted into the list.
Returns:
true if this list changed as a result of the call.

addAll

public boolean addAll(int index,
                      Collection c)
Overrides:
addAll in class ArrayList
Parameters:
index
c

asList

public List asList()
Return a view of this list as a {@code List}. Changes to the returned value are reflected by changes to the original {@code AttributeList} and vice versa.

Returns:
a {@code List} whose contents reflect the contents of this {@code AttributeList}.

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.


set

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:
index - The position specified.
object - The value to which the attribute element should be set.

set

public Object set(int index,
                  Object element)
Overrides:
set in class ArrayList
Parameters:
index
element


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.