Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess, SequencedCollection<Object>
public class RoleList extends ArrayList<Object>
modCount
| Constructor | Description | 
|---|---|
| RoleList() | Constructs an empty RoleList. | 
| RoleList | Constructs an empty RoleList with the initial capacity specified. | 
| RoleList | Constructs a  RoleListcontaining the elements of theListspecified, in the order in which they are returned by theList's iterator. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| void | add | Inserts the role specified as an element at the position specified. | 
| void | add | Adds the Role specified as the last element of the list. | 
| boolean | addAll | 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 | 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 | asList() | Return a view of this list as a  List<Role>. | 
| void | set | Sets the element at the position specified to be the role specified. | 
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, retainAll, set, size, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
parallelStream, stream, toArray
containsAll, replaceAll, reversed, sort
public RoleList()
public RoleList(int initialCapacity)
initialCapacity - initial capacitypublic RoleList(List<Role> list) throws IllegalArgumentException
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.list - the List that defines the initial contents of the new RoleList.IllegalArgumentException - if the list parameter is null or if the list parameter contains any non-Role objects.public List<Role> asList()
List<Role>. Changes to the returned value are reflected by changes to the original RoleList and vice versa.List<Role> whose contents reflect the contents of this RoleList. If this method has ever been called on a given RoleList instance, a subsequent attempt to add an object to that instance which is not a Role will fail with an IllegalArgumentException. For compatibility reasons, a RoleList on which this method has never been called does allow objects other than Roles to be added.
IllegalArgumentException - if this RoleList contains an element that is not a Role.public void add(Role role) throws IllegalArgumentException
role - the role to be added.IllegalArgumentException - if the role is null.public void add(int index, Role role) throws IllegalArgumentException, IndexOutOfBoundsException
index - The position in the list where the new Role object is to be inserted.role - The Role object to be inserted.IllegalArgumentException - if the role is null.IndexOutOfBoundsException - if accessing with an index outside of the list.public void set(int index, Role role) throws IllegalArgumentException, IndexOutOfBoundsException
index - The position specified.role - The value to which the role element should be set.IllegalArgumentException - if the role is null.IndexOutOfBoundsException - if accessing with an index outside of the list.public boolean addAll(RoleList roleList) throws IndexOutOfBoundsException
roleList - Elements to be inserted into the list (can be null)IndexOutOfBoundsException - if accessing with an index outside of the list.public boolean addAll(int index, RoleList roleList) throws IllegalArgumentException, IndexOutOfBoundsException
index - Position at which to insert the first element from the RoleList specified.roleList - Elements to be inserted into the list.IllegalArgumentException - if the role is null.IndexOutOfBoundsException - if accessing with an index outside of the list.
    © 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
    https://docs.oracle.com/en/java/javase/21/docs/api/java.management/javax/management/relation/RoleList.html