|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.util.collection.ArrayIterator<T>
T - 配列の要素の型public class ArrayIterator<T>
配列をIteratorにするAdaptorです。
次のように使います.
import static org.seasar.util.collection.ArrayIterator.*;
String[] array = ...;
for (String element : iterable(array)) {
...
}
| フィールドの概要 | |
|---|---|
protected int |
index
現在参照している要素のインデックス |
protected T[] |
items
イテレートする要素の配列 |
| コンストラクタの概要 | |
|---|---|
ArrayIterator(T... items)
ArrayIteratorを作成します。 |
|
| メソッドの概要 | ||
|---|---|---|
boolean |
hasNext()
|
|
static
|
iterable(T... items)
for each構文で使用するために配列をラップした Iterableを返します。 |
|
T |
next()
|
|
void |
remove()
|
|
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
protected final T[] items
protected int index
| コンストラクタの詳細 |
|---|
public ArrayIterator(T... items)
ArrayIteratorを作成します。
items - イテレートする要素の並び。nullであってはいけません| メソッドの詳細 |
|---|
public static <T> Iterable<T> iterable(T... items)
Iterableを返します。
T - 列挙する要素の型items - イテレートする要素の並び。nullであってはいけません
Iterablepublic boolean hasNext()
Iterator<T> 内の hasNextpublic T next()
Iterator<T> 内の nextpublic void remove()
Iterator<T> 内の remove
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||