站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

RoleList (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management.relation
Class RoleList

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

public class RoleList
extends ArrayList

A list of roles.

I think the idea is supposed to be that only roles should be in the list. But this isn't true.

Revisions:

20020313 Adrian Brock:

Version:
$Revision: 1.6 $
Author:
Adrian Brock
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RoleList()
          Construct an empty RoleList.
RoleList(int initialCapacity)
          Construct a RoleList with an initial capacity.
RoleList(List list)
          Construct a RoleList from a list.
 
Method Summary
 void add(int index, Role role)
          Adds a role at the specified location in the list.
 void add(Role role)
          Appends a role to the end of the list.
 boolean addAll(int index, RoleList roleList)
          Inserts a role list at the specified location in the list.
 boolean addAll(RoleList roleList)
          Appends a role list to the end of the list.
 Object clone()
          Cloning, creates a new RoleList with the same elements.
 void set(int index, Role role)
          Sets a role at the specified location in the list.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

RoleList

public RoleList()
Construct an empty RoleList.


RoleList

public RoleList(int initialCapacity)
Construct a RoleList with an initial capacity.

Parameters:
initialCapacity - the initial capacity.

RoleList

public RoleList(List list)
         throws IllegalArgumentException
Construct a RoleList from a list. It must be an ArrayList. The order of the list is maintained.

Parameters:
list - the list to copy from.
Throws:
IllegalArgumentException - for a null list or an list element that is not a role.
Method Detail

add

public void add(Role role)
         throws IllegalArgumentException
Appends a role to the end of the list.

Parameters:
role - the new role.
Throws:
IllegalArgumentException - if the role is null

add

public void add(int index,
                Role role)
         throws IllegalArgumentException,
                IndexOutOfBoundsException
Adds a role at the specified location in the list.

Parameters:
index - the location at which to insert the role.
role - the new role.
Throws:
IllegalArgumentException - if the role is null
IndexOutOfBoundsException - if there is no such index in the list

addAll

public boolean addAll(RoleList roleList)
               throws IndexOutOfBoundsException
Appends a role list to the end of the list.

Parameters:
roleList - the role list to insert, can be null
Returns:
true if the list changes, false otherwise
Throws:
IndexOutOfBoundsException - if there is no such index in the list (this is part of ArrayList for some reason?)

addAll

public boolean addAll(int index,
                      RoleList roleList)
               throws IllegalArgumentException,
                      IndexOutOfBoundsException
Inserts a role list at the specified location in the list.

Parameters:
index - the location at which to insert the role list.
roleList - the role list to insert.
Returns:
true if the list changes, false otherwise
Throws:
IllegalArgumentException - if the role list is null
IndexOutOfBoundsException - if there is no such index in the list

set

public void set(int index,
                Role role)
         throws IllegalArgumentException,
                IndexOutOfBoundsException
Sets a role at the specified location in the list.

Parameters:
index - the location of the role to replace.
role - the new role.
Throws:
IllegalArgumentException - if the role is null
IndexOutOfBoundsException - if there is no such index in the list

clone

public Object clone()
Cloning, creates a new RoleList with the same elements. The roles in the list are not cloned.

Returns:
the new empty role list.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.