Class IteratorTransform<I,T>
java.lang.Object
org.apache.commons.geometry.core.internal.IteratorTransform<I,T>
- Type Parameters:
I- Input iterator typeT- Output iterator type
- All Implemented Interfaces:
Iterator<T>
Class that wraps another iterator, converting each input iterator value into
one or more output iterator values.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIteratorTransform(Iterator<I> inputIterator) Create a new instance that uses the given iterator as the input source. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidacceptInput(I input) Accept a value from the input iterator.protected voidaddAllOutput(Collection<T> values) Add multiple values to the output queue.protected voidAdd a value to the output queue.booleanhasNext()next()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Constructor Details
-
IteratorTransform
Create a new instance that uses the given iterator as the input source.- Parameters:
inputIterator- iterator supplying input values
-
-
Method Details
-
hasNext
-
next
-
addOutput
-
addAllOutput
Add multiple values to the output queue.- Parameters:
values- values to add to the output queue
-
acceptInput
Accept a value from the input iterator. This method should take the input value and add one or more values to the output queue.- Parameters:
input- value from the input iterator
-