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>
- Direct Known Subclasses:
AbstractRegionBSPTree.RegionBoundaryIterator
-
Field Summary
FieldsModifier and TypeFieldDescriptionInput iterator instance that supplies the input values for this instance.Output value queue. -
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()private booleanLoad the next output values into the output queue.next()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
inputIterator
-
outputQueue
-
-
Constructor Details
-
IteratorTransform
-
-
Method Details
-
hasNext
-
next
-
loadNextOutput
private boolean loadNextOutput()Load the next output values into the output queue. Returns true if the output queue contains more entries.- Returns:
- true if more output values are available
-
addOutput
Add a value to the output queue.- Parameters:
value- value to add to the output queue
-
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
-