public static interface PrimitiveIterator.OfLong extends PrimitiveIterator<Long,LongConsumer>
long
值迭代器。
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong
Modifier and Type | Method and Description |
---|---|
default void |
forEachRemaining(Consumer<? super Long> action)
执行给定的每个剩余元素的动作,直到所有的元素都被处理或操作抛出异常。
|
default void |
forEachRemaining(LongConsumer action)
执行给定的每个剩余元素的动作,直到所有的元素都被处理或操作抛出异常。
|
default Long |
next()
返回迭代中的下一个元素。
|
long |
nextLong()
返回下一个
long 在迭代元。
|
long nextLong()
long
在迭代元。
long
在迭代元
NoSuchElementException
如果迭代没有更多的元素
default void forEachRemaining(LongConsumer action)
forEachRemaining
接口
PrimitiveIterator<Long,LongConsumer>
默认实现的行为像:
while (hasNext())
action.accept(nextLong());
action
-是的每个元素执行的动作
NullPointerException
-如果指定动作是无效的
default Long next()
next
接口
Iterator<Long>
nextLong()
盒的结果,并返回结果,盒装。
default void forEachRemaining(Consumer<? super Long> action)
forEachRemaining
接口
Iterator<Long>
LongConsumer
实例然后投
LongConsumer
并通过
forEachRemaining(java.util.function.LongConsumer)
;否则行动是适应
LongConsumer
实例,拳击
LongConsumer
参数,然后通过
forEachRemaining(java.util.function.LongConsumer)
。
action
-是的每个元素执行的动作
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.