T - the type of elements returned by this PrimitiveIterator. The type must be a wrapper type for a primitive type, such as Integer for the primitive int type.
T_CONS - the type of primitive consumer. The type must be a primitive specialization of Consumer for T, such as IntConsumer for Integer.
Iteration of primitive values using boxing-based methods next() and forEachRemaining(), does not affect the order in which the values, transformed to boxed values, are encountered.
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.
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