public static interface PrimitiveIterator.OfInt extends PrimitiveIterator<Integer,IntConsumer>
int値に特化されたイテレータ。PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| 修飾子と型 | メソッドと説明 |
|---|---|
default void |
forEachRemaining(Consumer<? super Integer> action)
すべての要素の処理が完了するかアクションから例外がスローされるまで、残りの各要素に対して指定されたアクションを実行します。
|
default void |
forEachRemaining(IntConsumer action)
すべての要素の処理が完了するかアクションから例外がスローされるまで、残りの各要素に対して指定されたアクションを実行します。
|
default Integer |
next()
反復処理で次の要素を返します。
|
int |
nextInt()
反復で次の
int要素を返します。 |
int nextInt()
int要素を返します。int要素NoSuchElementException - 反復処理で要素がない場合default void forEachRemaining(IntConsumer action)
forEachRemaining、インタフェース: PrimitiveIterator<Integer,IntConsumer>デフォルト実装は次のように動作します。
while (hasNext())
action.accept(nextInt());
action - 各要素に対して実行されるアクションNullPointerException - 指定されたアクションがnullである場合default Integer next()
default void forEachRemaining(Consumer<? super Integer> action)
forEachRemaining、インタフェース: Iterator<Integer>IntConsumerのインスタンスの場合、IntConsumerにキャストされ、forEachRemaining(java.util.function.IntConsumer)に渡されます。それ以外の場合、アクションはIntConsumerの引数をボクシングすることによってIntConsumerのインスタンスに適応されてから、forEachRemaining(java.util.function.IntConsumer)に渡されます。action - 各要素に対して実行されるアクション バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright© 1993, 2014, Oracle and/or its affiliates. All rights reserved.