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.relation
class RoleList

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

Most common way to construct:

RoleList list = new RoleList();

Based on 43 examples


public class RoleList
extends ArrayList

A RoleList represents a list of roles (Role objects). It is used as parameter when creating a relation, and when trying to set several roles in a relation (via 'setRoles()' method). It is returned as part of a RoleResult, to provide roles successfully retrieved.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary

          Constructs an empty RoleList.
RoleList(int initialCapacity)

          Constructs an empty RoleList with the initial capacity specified.
RoleList(List list)

          Constructs a containing the elements of the specified, in the order in which they are returned by the 's iterator.
 
Method Summary
 void
add(int index, Object element)

          Appends the specified element to the end of this list.
 void
add(int index, Role role)

          Inserts the role specified as an element at the position specified.
 boolean

          Appends the specified element to the end of this list.
 void
add(Role role)

          Adds the Role specified as the last element of the list.
 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, 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, RoleList roleList)

          Inserts all of the elements in the RoleList specified into this list, starting at the specified position, in the order in which they are returned by the Iterator of the RoleList specified.
 boolean
addAll(RoleList roleList)

          Appends all the elements in the RoleList specified to the end of the list, in the order in which they are returned by the Iterator of the RoleList specified.
 List

          Return a view of this list as a .
 Object
set(int index, Object element)

          Replaces the element at the specified position in this list with the specified element.
 void
set(int index, Role role)

          Sets the element at the position specified to be the role specified.
 
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

RoleList

public RoleList()
Constructs an empty RoleList.


RoleList

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

Parameters:
initialCapacity - initial capacity

RoleList

public RoleList(List list)
         throws IllegalArgumentException
Constructs a {@code RoleList} containing the elements of the {@code List} specified, in the order in which they are returned by the {@code List}'s iterator. The {@code RoleList} instance has an initial capacity of 110% of the size of the {@code List} specified.

Parameters:
list - the {@code List} that defines the initial contents of the new {@code RoleList}.
Throws:
IllegalArgumentException - if the {@code list} parameter is {@code null} or if the {@code list} parameter contains any non-Role objects.
Method Detail

add

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

add

public void add(int index,
                Role role)
         throws IllegalArgumentException,
                IndexOutOfBoundsException
Inserts the role specified as an element at the position specified. Elements with an index greater than or equal to the current position are shifted up.

Parameters:
index - The position in the list where the new Role object is to be inserted.
role - The Role object to be inserted.
Throws:
IllegalArgumentException - if the role is null.
IndexOutOfBoundsException - if accessing with an index outside of the list.

add

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

add

public void add(Role role)
         throws IllegalArgumentException
Adds the Role specified as the last element of the list.

Parameters:
role - the role to be added.
Throws:
IllegalArgumentException - if the role is null.

addAll

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

addAll

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

addAll

public boolean addAll(int index,
                      RoleList roleList)
               throws IllegalArgumentException,
                      IndexOutOfBoundsException
Inserts all of the elements in the RoleList specified into this list, starting at the specified position, in the order in which they are returned by the Iterator of the RoleList specified.

Parameters:
index - Position at which to insert the first element from the RoleList specified.
roleList - Elements to be inserted into the list.
Returns:
true if this list changed as a result of the call.
Throws:
IllegalArgumentException - if the role is null.
IndexOutOfBoundsException - if accessing with an index outside of the list.

addAll

public boolean addAll(RoleList roleList)
               throws IndexOutOfBoundsException
Appends all the elements in the RoleList specified to the end of the list, in the order in which they are returned by the Iterator of the RoleList specified.

Parameters:
roleList - Elements to be inserted into the list (can be null)
Returns:
true if this list changed as a result of the call.
Throws:
IndexOutOfBoundsException - if accessing with an index outside of the list.

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 RoleList} and vice versa.

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

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


set

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

set

public void set(int index,
                Role role)
         throws IllegalArgumentException,
                IndexOutOfBoundsException
Sets the element at the position specified to be the role specified. The previous element at that position is discarded.

Parameters:
index - The position specified.
role - The value to which the role element should be set.
Throws:
IllegalArgumentException - if the role is null.
IndexOutOfBoundsException - if accessing with an index outside of the list.


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/.