|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Object>
javax.management.relation.RoleList
public class RoleList
RoleList 表示角色(Role 物件)的列表。它在創建關係和試圖在關係中設置幾個角色(通過 'setRoles()'方法)時用作參數。它將作為 RoleResult 的一部分返回,以提供成功檢索的角色。
| 欄位摘要 |
|---|
| 從類別 java.util.AbstractList 繼承的欄位 |
|---|
modCount |
| 建構子摘要 | |
|---|---|
RoleList()
建構一個空的 RoleList。 |
|
RoleList(int initialCapacity)
建構一個具有指定初始容量的空 RoleList。 |
|
RoleList(List<Role> list)
建構一個套件含指定 List 元素的 RoleList,這些元素按 List 迭代器返回的順序排列。 |
|
| 方法摘要 | |
|---|---|
void |
add(int index,
Object element)
將指定的元素插入此列表中的指定位置。 |
void |
add(int index,
Role role)
插入指定為指定位置處的元素的角色。 |
boolean |
add(Object o)
將指定的元素添加到此列表的尾部。 |
void |
add(Role role)
添加指定為列表中最後一個元素的 Role。 |
boolean |
addAll(Collection<?> c)
按照指定 collection 的迭代器所返回的元素順序,將該 collection 中的所有元素添加到此列表的尾部。 |
boolean |
addAll(int index,
Collection<?> c)
從指定的位置開始,將指定 collection 中的所有元素插入到此列表中。 |
boolean |
addAll(int index,
RoleList roleList)
從指定位置開始,將指定 RoleList 中的所有元素插入此列表,這些元素按指定 RoleList 的迭代器返回的順序排列。 |
boolean |
addAll(RoleList roleList)
將指定 RoleList 中的所有元素追加到列表末尾,這些元素按指定 RoleList 的迭代器返回的順序排列。 |
List<Role> |
asList()
以 List<Role> 的形式返回此列表的示圖。 |
Object |
set(int index,
Object element)
用指定的元素替代此列表中指定位置上的元素。 |
void |
set(int index,
Role role)
將指定位置處的元素設置為指定角色。 |
| 從類別 java.util.ArrayList 繼承的方法 |
|---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, 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 |
| 建構子詳細資訊 |
|---|
public RoleList()
public RoleList(int initialCapacity)
initialCapacity - 初始容量
public RoleList(List<Role> list)
throws IllegalArgumentException
List 元素的 RoleList,這些元素按 List 迭代器返回的順序排列。RoleList 實例的初始容量是指定 List 大小的 110%。
list - 定義新 RoleList 初始內容的 List。
IllegalArgumentException - 如果 list 參數為 null 或者 list 參數包含任何非 Role 物件。ArrayList.ArrayList(java.util.Collection)| 方法詳細資訊 |
|---|
public List<Role> asList()
List<Role> 的形式返回此列表的示圖。對返回值的更改將通過對原 RoleList 的更改反映出來,反之亦然。
List<Role>,其內容反映此 RoleList 的內容。
如果曾經對給定的 RoleList 實例調用過此方法,則之後試圖對該實例添加非 Role 物件的操作將會失敗,並拋出 IllegalArgumentException。出於相容性原因,允許向從未調用過此方法的 RoleList 添加非 Role 物件。
IllegalArgumentException - 如果此 RoleList 套件含非 Role 元素。
public void add(Role role)
throws IllegalArgumentException
role - 要添加的角色。
IllegalArgumentException - 如果角色為 null。
public void add(int index,
Role role)
throws IllegalArgumentException,
IndexOutOfBoundsException
index - 在列表中要插入新 Role 物件的位置。role - 要插入的 Role 物件。
IllegalArgumentException - 如果角色為 null。
IndexOutOfBoundsException - 如果用列表之外的索引存取。
public void set(int index,
Role role)
throws IllegalArgumentException,
IndexOutOfBoundsException
index - 指定的位置。role - 角色元素應該設置為的值。
IllegalArgumentException - 如果角色為 null。
IndexOutOfBoundsException - 如果用列表之外的索引存取。
public boolean addAll(RoleList roleList)
throws IndexOutOfBoundsException
roleList - 要插入列表的元素(可以為 null)
IndexOutOfBoundsException - 如果用列表之外的索引存取。ArrayList.addAll(Collection)
public boolean addAll(int index,
RoleList roleList)
throws IllegalArgumentException,
IndexOutOfBoundsException
index - 插入指定 RoleList 中第一個元素的位置。roleList - 要插入該列表的元素。
IllegalArgumentException - 如果角色為 null。
IndexOutOfBoundsException - 如果用列表之外的索引存取。ArrayList.addAll(int, Collection)public boolean add(Object o)
ArrayList 複製的描述
Collection<Object> 中的 addList<Object> 中的 addArrayList<Object> 中的 addo - 要添加到此列表中的元素
Collection.add(E) 的指定)
public void add(int index,
Object element)
ArrayList 複製的描述
List<Object> 中的 addArrayList<Object> 中的 addindex - 指定元素所插入位置的索引element - 要插入的元素public boolean addAll(Collection<?> c)
ArrayList 複製的描述
Collection<Object> 中的 addAllList<Object> 中的 addAllArrayList<Object> 中的 addAllc - 套件含要添加到此列表中的元素的 collection
AbstractCollection.add(Object)
public boolean addAll(int index,
Collection<?> c)
ArrayList 複製的描述
List<Object> 中的 addAllArrayList<Object> 中的 addAllindex - 插入指定 collection 中的首個元素的位置索引c - 套件含要添加到此列表中元素的 collection
public Object set(int index,
Object element)
ArrayList 複製的描述
List<Object> 中的 setArrayList<Object> 中的 setindex - 要替代的元素的索引element - 存儲在指定位置上的元素
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。