Class: javax.management.relation.RoleList
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.
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.relation.RoleList
Methods
-
RoleListtop
public RoleList()Constructs an empty RoleList. -
RoleListtop
public RoleList(int initialCapacity)Constructs an empty RoleList with the initial capacity specified. -
RoleListtop
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. -
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, Role role) throws IllegalArgumentException, IndexOutOfBoundsExceptionInserts 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. -
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(Role role) throws IllegalArgumentExceptionAdds the Role 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, RoleList roleList) throws IllegalArgumentException, IndexOutOfBoundsExceptionInserts 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. -
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(RoleList roleList) throws IndexOutOfBoundsExceptionAppends 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. -
asListtop
Return a view of this list as a List<Role>. Changes to the returned value are reflected by changes to the original RoleList 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, Role role) throws IllegalArgumentException, IndexOutOfBoundsExceptionSets the element at the position specified to be the role specified. The previous element at that position is discarded.
