javax.management.relation
Class RoleList

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.AbstractCollection sample code for java.util.AbstractCollection definition code for java.util.AbstractCollection <E>
      extended by java.util.AbstractList sample code for java.util.AbstractList definition code for java.util.AbstractList <E>
          extended by java.util.ArrayList sample code for java.util.ArrayList definition code for java.util.ArrayList 
              extended by javax.management.relation.RoleList
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Iterable sample code for java.lang.Iterable definition code for java.lang.Iterable , Collection sample code for java.util.Collection definition code for java.util.Collection , List sample code for java.util.List definition code for java.util.List , RandomAccess sample code for java.util.RandomAccess definition code for java.util.RandomAccess

public class RoleList
extends ArrayList sample code for java.util.ArrayList definition code for java.util.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.

Since:
1.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList sample code for java.util.AbstractList definition code for java.util.AbstractList
modCount sample code for java.util.AbstractList.modCount definition code for java.util.AbstractList.modCount
 
Constructor Summary
RoleList sample code for javax.management.relation.RoleList.RoleList() definition code for javax.management.relation.RoleList.RoleList() ()
          Constructs an empty RoleList.
RoleList sample code for javax.management.relation.RoleList.RoleList(int) definition code for javax.management.relation.RoleList.RoleList(int) (int theInitialCapacity)
          Constructs an empty RoleList with the initial capacity specified.
RoleList sample code for javax.management.relation.RoleList.RoleList(java.util.List) definition code for javax.management.relation.RoleList.RoleList(java.util.List) (List sample code for java.util.List definition code for java.util.List  theList)
          Constructs a RoleList containing the elements of the List specified, in the order in which they are returned by the List's iterator.
 
Method Summary
 void add sample code for javax.management.relation.RoleList.add(int, javax.management.relation.Role) definition code for javax.management.relation.RoleList.add(int, javax.management.relation.Role) (int theIndex, Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
          Inserts the role specified as an element at the position specified.
 void add sample code for javax.management.relation.RoleList.add(javax.management.relation.Role) definition code for javax.management.relation.RoleList.add(javax.management.relation.Role) (Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
          Adds the Role specified as the last element of the list.
 boolean addAll sample code for javax.management.relation.RoleList.addAll(int, javax.management.relation.RoleList) definition code for javax.management.relation.RoleList.addAll(int, javax.management.relation.RoleList) (int theIndex, RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
          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 sample code for javax.management.relation.RoleList.addAll(javax.management.relation.RoleList) definition code for javax.management.relation.RoleList.addAll(javax.management.relation.RoleList) (RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
          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.
 void set sample code for javax.management.relation.RoleList.set(int, javax.management.relation.Role) definition code for javax.management.relation.RoleList.set(int, javax.management.relation.Role) (int theIndex, Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
          Sets the element at the position specified to be the role specified.
 
Methods inherited from class java.util.ArrayList sample code for java.util.ArrayList definition code for java.util.ArrayList
add sample code for java.util.ArrayList.add(E) definition code for java.util.ArrayList.add(E) , add sample code for java.util.ArrayList.add(int, E) definition code for java.util.ArrayList.add(int, E) , addAll sample code for java.util.ArrayList.addAll(java.util.Collection) definition code for java.util.ArrayList.addAll(java.util.Collection) , addAll sample code for java.util.ArrayList.addAll(int, java.util.Collection) definition code for java.util.ArrayList.addAll(int, java.util.Collection) , clear sample code for java.util.ArrayList.clear() definition code for java.util.ArrayList.clear() , clone sample code for java.util.ArrayList.clone() definition code for java.util.ArrayList.clone() , contains sample code for java.util.ArrayList.contains(java.lang.Object) definition code for java.util.ArrayList.contains(java.lang.Object) , ensureCapacity sample code for java.util.ArrayList.ensureCapacity(int) definition code for java.util.ArrayList.ensureCapacity(int) , get sample code for java.util.ArrayList.get(int) definition code for java.util.ArrayList.get(int) , indexOf sample code for java.util.ArrayList.indexOf(java.lang.Object) definition code for java.util.ArrayList.indexOf(java.lang.Object) , isEmpty sample code for java.util.ArrayList.isEmpty() definition code for java.util.ArrayList.isEmpty() , lastIndexOf sample code for java.util.ArrayList.lastIndexOf(java.lang.Object) definition code for java.util.ArrayList.lastIndexOf(java.lang.Object) , remove sample code for java.util.ArrayList.remove(int) definition code for java.util.ArrayList.remove(int) , remove sample code for java.util.ArrayList.remove(java.lang.Object) definition code for java.util.ArrayList.remove(java.lang.Object) , removeRange sample code for java.util.ArrayList.removeRange(int, int) definition code for java.util.ArrayList.removeRange(int, int) , set sample code for java.util.ArrayList.set(int, E) definition code for java.util.ArrayList.set(int, E) , size sample code for java.util.ArrayList.size() definition code for java.util.ArrayList.size() , toArray sample code for java.util.ArrayList.toArray() definition code for java.util.ArrayList.toArray() , toArray sample code for java.util.ArrayList.toArray(T[]) definition code for java.util.ArrayList.toArray(T[]) , trimToSize sample code for java.util.ArrayList.trimToSize() definition code for java.util.ArrayList.trimToSize()
 
Methods inherited from class java.util.AbstractList sample code for java.util.AbstractList definition code for java.util.AbstractList
equals sample code for java.util.AbstractList.equals(java.lang.Object) definition code for java.util.AbstractList.equals(java.lang.Object) , hashCode sample code for java.util.AbstractList.hashCode() definition code for java.util.AbstractList.hashCode() , iterator sample code for java.util.AbstractList.iterator() definition code for java.util.AbstractList.iterator() , listIterator sample code for java.util.AbstractList.listIterator() definition code for java.util.AbstractList.listIterator() , listIterator sample code for java.util.AbstractList.listIterator(int) definition code for java.util.AbstractList.listIterator(int) , subList sample code for java.util.AbstractList.subList(int, int) definition code for java.util.AbstractList.subList(int, int)
 
Methods inherited from class java.util.AbstractCollection sample code for java.util.AbstractCollection definition code for java.util.AbstractCollection
containsAll sample code for java.util.AbstractCollection.containsAll(java.util.Collection) definition code for java.util.AbstractCollection.containsAll(java.util.Collection) , removeAll sample code for java.util.AbstractCollection.removeAll(java.util.Collection) definition code for java.util.AbstractCollection.removeAll(java.util.Collection) , retainAll sample code for java.util.AbstractCollection.retainAll(java.util.Collection) definition code for java.util.AbstractCollection.retainAll(java.util.Collection) , toString sample code for java.util.AbstractCollection.toString() definition code for java.util.AbstractCollection.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface java.util.List sample code for java.util.List definition code for java.util.List
containsAll sample code for java.util.List.containsAll(java.util.Collection) definition code for java.util.List.containsAll(java.util.Collection) , equals sample code for java.util.List.equals(java.lang.Object) definition code for java.util.List.equals(java.lang.Object) , hashCode sample code for java.util.List.hashCode() definition code for java.util.List.hashCode() , iterator sample code for java.util.List.iterator() definition code for java.util.List.iterator() , listIterator sample code for java.util.List.listIterator() definition code for java.util.List.listIterator() , listIterator sample code for java.util.List.listIterator(int) definition code for java.util.List.listIterator(int) , removeAll sample code for java.util.List.removeAll(java.util.Collection) definition code for java.util.List.removeAll(java.util.Collection) , retainAll sample code for java.util.List.retainAll(java.util.Collection) definition code for java.util.List.retainAll(java.util.Collection) , subList sample code for java.util.List.subList(int, int) definition code for java.util.List.subList(int, int)
 

Constructor Detail

RoleList sample code for javax.management.relation.RoleList() definition code for javax.management.relation.RoleList()

public RoleList()
Constructs an empty RoleList.


RoleList sample code for javax.management.relation.RoleList(int) definition code for javax.management.relation.RoleList(int)

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

Parameters:
theInitialCapacity - initial capacity

RoleList sample code for javax.management.relation.RoleList(java.util.List) definition code for javax.management.relation.RoleList(java.util.List)

public RoleList(List sample code for java.util.List definition code for java.util.List  theList)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Constructs a RoleList containing the elements of the List specified, in the order in which they are returned by the List's iterator. The RoleList instance has an initial capacity of 110% of the size of the List specified.

Parameters:
theList - list of Role objects
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if:

- null parameter

or

- an element in the List is not a Role

Method Detail

add sample code for javax.management.relation.RoleList.add(javax.management.relation.Role) definition code for javax.management.relation.RoleList.add(javax.management.relation.Role)

public void add(Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Adds the Role specified as the last element of the list.

Parameters:
theRole - the role to be added.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the role is null.

add sample code for javax.management.relation.RoleList.add(int, javax.management.relation.Role) definition code for javax.management.relation.RoleList.add(int, javax.management.relation.Role)

public void add(int theIndex,
                Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.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:
theIndex - The position in the list where the new Role object is to be inserted.
theRole - The Role object to be inserted.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the role is null.
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if accessing with an index outside of the list.

set sample code for javax.management.relation.RoleList.set(int, javax.management.relation.Role) definition code for javax.management.relation.RoleList.set(int, javax.management.relation.Role)

public void set(int theIndex,
                Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException 
Sets the element at the position specified to be the role specified. The previous element at that position is discarded.

Parameters:
theIndex - The position specified.
theRole - The value to which the role element should be set.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the role is null.
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if accessing with an index outside of the list.

addAll sample code for javax.management.relation.RoleList.addAll(javax.management.relation.RoleList) definition code for javax.management.relation.RoleList.addAll(javax.management.relation.RoleList)

public boolean addAll(RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
               throws IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.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:
theRoleList - Elements to be inserted into the list (can be null)
Returns:
true if this list changed as a result of the call.
Throws:
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if accessing with an index outside of the list.
See Also:
ArrayList.addAll(Collection) sample code for java.util.ArrayList.addAll(java.util.Collection) definition code for java.util.ArrayList.addAll(java.util.Collection)

addAll sample code for javax.management.relation.RoleList.addAll(int, javax.management.relation.RoleList) definition code for javax.management.relation.RoleList.addAll(int, javax.management.relation.RoleList)

public boolean addAll(int theIndex,
                      RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
               throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                      IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.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:
theIndex - Position at which to insert the first element from the RoleList specified.
theRoleList - Elements to be inserted into the list.
Returns:
true if this list changed as a result of the call.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the role is null.
IndexOutOfBoundsException sample code for java.lang.IndexOutOfBoundsException definition code for java.lang.IndexOutOfBoundsException - if accessing with an index outside of the list.
See Also:
ArrayList.addAll(int, Collection) sample code for java.util.ArrayList.addAll(int, java.util.Collection) definition code for java.util.ArrayList.addAll(int, java.util.Collection)