java.applet

java.awt

java.awt.color

java.awt.datatransfer

java.awt.dnd

java.awt.event

java.awt.font

java.awt.geom

java.awt.im

java.awt.im.spi

java.awt.image

java.awt.image.renderable

java.awt.print

java.beans

java.beans.beancontext

java.io

java.lang

java.lang.annotation

java.lang.instrument

java.lang.management

java.lang.ref

java.lang.reflect

java.math

java.net

java.nio

java.nio.channels

java.nio.channels.spi

java.nio.charset

java.nio.charset.spi

java.rmi

java.rmi.activation

java.rmi.dgc

java.rmi.registry

java.rmi.server

java.security

java.security.acl

java.security.cert

java.security.interfaces

java.security.spec

java.sql

java.text

java.util

java.util.concurrent

java.util.concurrent.atomic

java.util.concurrent.locks

java.util.jar

java.util.logging

java.util.prefs

java.util.regex

java.util.zip

javax.accessibility

javax.activity

javax.crypto

javax.crypto.interfaces

javax.crypto.spec

javax.imageio

javax.imageio.event

javax.imageio.metadata

javax.imageio.plugins.bmp

javax.imageio.plugins.jpeg

javax.imageio.spi

javax.imageio.stream

javax.management

javax.management.loading

javax.management.modelmbean

javax.management.monitor

javax.management.openmbean

javax.management.relation

javax.management.remote

javax.management.remote.rmi

javax.management.timer

javax.naming

javax.naming.directory

javax.naming.event

javax.naming.ldap

javax.naming.spi

javax.net

javax.net.ssl

javax.print

javax.print.attribute

javax.print.attribute.standard

javax.print.event

javax.rmi

javax.rmi.CORBA

javax.rmi.ssl

javax.security.auth

javax.security.auth.callback

javax.security.auth.kerberos

javax.security.auth.login

javax.security.auth.spi

javax.security.auth.x500

javax.security.cert

javax.security.sasl

javax.sound.midi

javax.sound.midi.spi

javax.sound.sampled

javax.sound.sampled.spi

javax.sql

javax.sql.rowset

javax.sql.rowset.serial

javax.sql.rowset.spi

javax.swing

javax.swing.border

javax.swing.colorchooser

javax.swing.event

javax.swing.filechooser

javax.swing.plaf

javax.swing.plaf.basic

javax.swing.plaf.metal

javax.swing.plaf.multi

javax.swing.plaf.synth

javax.swing.table

javax.swing.text

javax.swing.text

javax.swing.text.parser

javax.swing.text.rtf

javax.swing.tree

javax.swing.undo

javax.transaction

javax.transaction.xa

javax.xml

javax.xml.datatype

javax.xml.namespace

javax.xml.parsers

javax.xml.transform

javax.xml.transform.dom

javax.xml.transform.sax

javax.xml.transform.stream

javax.xml.validation

javax.xml.xpath

org.ietf.jgss

org.omg.CORBA

org.omg.CORBA_2_3

org.omg.CORBA_2_3.portable

org.omg.CORBA.DynAnyPackage

org.omg.CORBA.ORBPackage

org.omg.CORBA.portable

org.omg.CORBA.TypeCodePackage

org.omg.CosNaming

org.omg.CosNaming.NamingContextExtPackage

org.omg.CosNaming.NamingContextPackage

org.omg.Dynamic

org.omg.DynamicAny

org.omg.DynamicAny.DynAnyFactoryPackage

org.omg.DynamicAny.DynAnyPackage

org.omg.IOP

org.omg.IOP.CodecFactoryPackage

org.omg.IOP.CodecPackage

org.omg.Messaging

org.omg.PortableInterceptor

org.omg.PortableInterceptor.ORBInitInfoPackage

org.omg.PortableServer

org.omg.PortableServer.CurrentPackage

org.omg.PortableServer.POAManagerPackage

org.omg.PortableServer.POAPackage

org.omg.PortableServer.portable

org.omg.PortableServer.ServantLocatorPackage

org.omg.SendingContext

org.omg.stub.java.rmi

org.w3c.dom

org.w3c.dom.bootstrap

org.w3c.dom.events

org.w3c.dom.ls

org.xml.sax

org.xml.sax.ext

org.xml.sax.helpers

allclasses-frame

allclasses-noframe

constant-values

deprecated-list

help-doc

JavaTM 2 Platform
Standard Ed. 5.0

javax.management.relation
类 RoleList

java.lang.Object
  继承者 java.util.AbstractCollection<E>
      继承者 java.util.AbstractList<E>
          继承者 java.util.ArrayList
              继承者 javax.management.relation.RoleList
所有已实现的接口:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess

public class RoleList
extends ArrayList

RoleList 表示角色(Role 对象)的列表。它在创建关系和试图在关系中设置几个角色(通过 'setRoles()'方法)时用作参数。它将作为 RoleResult 的一部分返回,以提供成功检索的角色。

从以下版本开始:
1.5
另请参见:
序列化表格

字段摘要
 
从类 java.util.AbstractList 继承的字段
modCount
 
构造方法摘要
RoleList()
          构造一个空的 RoleList。
RoleList(int theInitialCapacity)
          构造一个具有指定初始容量的空 RoleList。
RoleList(List theList)
          构造一个包含指定列表的元素的 RoleList,这些元素按列表的迭代器返回的顺序排列。
 
方法摘要
 void add(int theIndex, Role theRole)
          插入指定为指定位置处的元素的角色。
 void add(Role theRole)
          添加指定为列表中最后一个元素的 Role。
 boolean addAll(int theIndex, RoleList theRoleList)
          从指定位置开始,将指定 RoleList 中的所有元素插入此列表,这些元素按指定 RoleList 的迭代器返回的顺序排列。
 boolean addAll(RoleList theRoleList)
          将指定 RoleList 中的所有元素追加到列表末尾,这些元素按指定 RoleList 的迭代器返回的顺序排列。
 void set(int theIndex, Role theRole)
          将指定位置处的元素设置为指定角色。
 
从类 java.util.ArrayList 继承的方法
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
从类 java.util.AbstractList 继承的方法
equals, hashCode, iterator, listIterator, listIterator, subList
 
从类 java.util.AbstractCollection 继承的方法
containsAll, removeAll, retainAll, toString
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 java.util.List 继承的方法
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

构造方法详细信息

RoleList

public RoleList()
构造一个空的 RoleList。


RoleList

public RoleList(int theInitialCapacity)
构造一个具有指定初始容量的空 RoleList。

参数:
theInitialCapacity - 初始容量

RoleList

public RoleList(List theList)
         throws IllegalArgumentException
构造一个包含指定列表的元素的 RoleList,这些元素按列表的迭代器返回的顺序排列。RoleList 实例的初始容量是指定列表大小的 110%。

参数:
theList - Role 对象的列表
抛出:
IllegalArgumentException - 如果:

- 为 null 参数

或者

- 列表中的元素不是 Role

方法详细信息

add

public void add(Role theRole)
         throws IllegalArgumentException
添加指定为列表中最后一个元素的 Role。

参数:
theRole - 要添加的角色。
抛出:
IllegalArgumentException - 如果角色为 null。

add

public void add(int theIndex,
                Role theRole)
         throws IllegalArgumentException,
                IndexOutOfBoundsException
插入指定为指定位置处的元素的角色。将其索引大于或等于当前位置的元素上移。

参数:
theIndex - 在列表中要插入新 Role 对象的位置。
theRole - 要插入的 Role 对象。
抛出:
IllegalArgumentException - 如果角色为 null。
IndexOutOfBoundsException - 如果用列表之外的索引访问。

set

public void set(int theIndex,
                Role theRole)
         throws IllegalArgumentException,
                IndexOutOfBoundsException
将指定位置处的元素设置为指定角色。丢弃该位置以前的元素。

参数:
theIndex - 指定的位置。
theRole - 角色元素应该设置为的值。
抛出:
IllegalArgumentException - 如果角色为 null。
IndexOutOfBoundsException - 如果用列表之外的索引访问。

addAll

public boolean addAll(RoleList theRoleList)
               throws IndexOutOfBoundsException
将指定 RoleList 中的所有元素追加到列表末尾,这些元素按指定 RoleList 的迭代器返回的顺序排列。

参数:
theRoleList - 要插入列表的元素(可以为 null)
返回:
如果此列表由于调用而更改,则返回 true。
抛出:
IndexOutOfBoundsException - 如果用列表之外的索引访问。
另请参见:
ArrayList.addAll(Collection)

addAll

public boolean addAll(int theIndex,
                      RoleList theRoleList)
               throws IllegalArgumentException,
                      IndexOutOfBoundsException
从指定位置开始,将指定 RoleList 中的所有元素插入此列表,这些元素按指定 RoleList 的迭代器返回的顺序排列。

参数:
index - 在其处插入指定 RoleList 中第一个元素的位置。
theRoleList - 要插入该列表的元素。
返回:
如果此列表由于调用而更改,则返回 true。
抛出:
IllegalArgumentException - 如果角色为 null。
IndexOutOfBoundsException - 如果用列表之外的索引访问。
另请参见:
ArrayList.addAll(int, Collection)

JavaTM 2 Platform
Standard Ed. 5.0

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java 2 SDK SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策