public class RoleList extends ArrayList<Object>
modCount
コンストラクタと説明 |
---|
RoleList()
空の RoleList を作成します。
|
RoleList(int initialCapacity)
指定された初期容量で空の RoleList を作成します。
|
RoleList(List<Role> list)
指定された
List の要素を、List のイテレータによって返される順に格納する RoleList を構築します。 |
修飾子と型 | メソッドと説明 |
---|---|
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)
指定されたコレクション内のすべての要素を、指定されたコレクションのイテレータによって返される順序でリストの最後に追加します。
|
boolean |
addAll(int index, Collection<?> c)
指定されたコレクション内のすべての要素を、リストの指定された位置に挿入します。
|
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)
指定された位置の要素に、指定されたロールを設定します。
|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, size, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
containsAll, equals, hashCode
public RoleList()
public RoleList(int initialCapacity)
initialCapacity
- 初期容量public RoleList(List<Role> list) throws IllegalArgumentException
List
の要素を、List
のイテレータによって返される順に格納する RoleList
を構築します。RoleList
インスタンスの初期サイズは、指定された List
のサイズの 110% です。list
- 新しい List
の初期コンテンツを定義する RoleList
。IllegalArgumentException
- list
パラメータが null
である場合、または list
パラメータに Role でないオブジェクトが含まれる場合。ArrayList.ArrayList(java.util.Collection)
public List<Role> asList()
List<Role>
として返します。戻り値を変更すると元の RoleList
が変更され、逆の場合も同じです。RoleList
の内容を反映する List<Role>
このメソッドが指定した 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
add
、インタフェース: Collection<Object>
add
、インタフェース: List<Object>
add
、クラス: ArrayList<Object>
o
- リストに追加される要素Collection.add(E)
で指定されているとおり)public void add(int index, Object element)
ArrayList
public boolean addAll(Collection<?> c)
ArrayList
addAll
、インタフェース: Collection<Object>
addAll
、インタフェース: List<Object>
addAll
、クラス: ArrayList<Object>
c
- このリストに追加される要素を含むコレクション。AbstractCollection.add(Object)
public boolean addAll(int index, Collection<?> c)
ArrayList
バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.