PrimitiveIterator (Java SE 10 & JDK 10 ) (original) (raw)
- Type Parameters:
T- the type of elements returned by this PrimitiveIterator. The type must be a wrapper type for a primitive type, such asIntegerfor the primitiveinttype.T_CONS- the type of primitive consumer. The type must be a primitive specialization of Consumer forT, such as IntConsumer forInteger.
All Superinterfaces:[Iterator](../../java/util/Iterator.html "interface in java.util")<T>
All Known Subinterfaces:[PrimitiveIterator.OfDouble](../../java/util/PrimitiveIterator.OfDouble.html "interface in java.util"),[PrimitiveIterator.OfInt](../../java/util/PrimitiveIterator.OfInt.html "interface in java.util"),[PrimitiveIterator.OfLong](../../java/util/PrimitiveIterator.OfLong.html "interface in java.util")
public interface PrimitiveIterator<T,T_CONS>
extends Iterator
Implementation Note:
If the boolean system property org.openjdk.java.util.stream.tripwire is set to true then diagnostic warnings are reported if boxing of primitive values occur when operating on primitive subtype specializations.
Since:
1.8
Nested Class Summary
Nested Classes
Modifier and Type Interface Description static interface PrimitiveIterator.OfDouble An Iterator specialized for double values. static interface PrimitiveIterator.OfInt An Iterator specialized for int values. static interface PrimitiveIterator.OfLong An Iterator specialized for long values. Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method Description void forEachRemaining(T_CONS action) Performs the given action for each remaining element, in the order elements occur when iterating, until all elements have been processed or the action throws an exception. * ### Methods declared in interface java.util.[Iterator](../../java/util/Iterator.html "interface in java.util") `[forEachRemaining](../../java/util/Iterator.html#forEachRemaining%28java.util.function.Consumer%29), [hasNext](../../java/util/Iterator.html#hasNext%28%29), [next](../../java/util/Iterator.html#next%28%29), [remove](../../java/util/Iterator.html#remove%28%29)`Method Detail
* #### forEachRemaining void forEachRemaining([T_CONS](../../java/util/PrimitiveIterator.html "type parameter in PrimitiveIterator") action) Performs the given action for each remaining element, in the order elements occur when iterating, until all elements have been processed or the action throws an exception. Errors or runtime exceptions thrown by the action are relayed to the caller. Parameters: `action` \- The action to be performed for each element Throws: `[NullPointerException](../../java/lang/NullPointerException.html "class in java.lang")` \- if the specified action is null
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2018, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.