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.
| Method from javax.management.relation.RoleList Detail: |
public void add(Role role) throws IllegalArgumentException {
if (role == null) {
String excMsg = "Invalid parameter";
throw new IllegalArgumentException(excMsg);
}
super.add(role);
}
Adds the Role specified as the last element of the list. |
public boolean add(Object o) {
if (!tainted)
tainted = isTainted(o);
if (typeSafe)
checkTypeSafe(o);
return super.add(o);
}
|
public void add(int index,
Role role) throws IllegalArgumentException, IndexOutOfBoundsException {
if (role == null) {
String excMsg = "Invalid parameter";
throw new IllegalArgumentException(excMsg);
}
super.add(index, role);
}
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. |
public void add(int index,
Object element) {
if (!tainted)
tainted = isTainted(element);
if (typeSafe)
checkTypeSafe(element);
super.add(index, element);
}
|
public boolean addAll(RoleList roleList) throws IndexOutOfBoundsException {
if (roleList == null) {
return true;
}
return (super.addAll(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. |
public boolean addAll(Collection c) {
if (!tainted)
tainted = isTainted(c);
if (typeSafe)
checkTypeSafe(c);
return super.addAll(c);
}
|
public boolean addAll(int index,
RoleList roleList) throws IllegalArgumentException, IndexOutOfBoundsException {
if (roleList == null) {
// Revisit [cebro] Localize message
String excMsg = "Invalid parameter.";
throw new IllegalArgumentException(excMsg);
}
return (super.addAll(index, 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. |
public boolean addAll(int index,
Collection c) {
if (!tainted)
tainted = isTainted(c);
if (typeSafe)
checkTypeSafe(c);
return super.addAll(index, c);
}
|
public List asList() {
if (!typeSafe) {
if (tainted)
checkTypeSafe(this);
typeSafe = true;
}
return (List< Role >) (List) this;
}
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. |
public void set(int index,
Role role) throws IllegalArgumentException, IndexOutOfBoundsException {
if (role == null) {
// Revisit [cebro] Localize message
String excMsg = "Invalid parameter.";
throw new IllegalArgumentException(excMsg);
}
super.set(index, role);
}
Sets the element at the position specified to be the role
specified.
The previous element at that position is discarded. |
public Object set(int index,
Object element) {
if (!tainted)
tainted = isTainted(element);
if (typeSafe)
checkTypeSafe(element);
return super.set(index, element);
}
|