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