Class AbstractBoundaryReadHandler3D.FacetDefinitionReaderIterator
java.lang.Object
org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryReadHandler3D.FacetDefinitionReaderIterator
- All Implemented Interfaces:
Iterator<FacetDefinition>
- Enclosing class:
AbstractBoundaryReadHandler3D
static final class AbstractBoundaryReadHandler3D.FacetDefinitionReaderIterator
extends Object
implements Iterator<FacetDefinition>
Class exposing a
FacetDefinitionReader
as an iterator.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Number of facets read from the reader.private FacetDefinition
Next facet to return from the instance; may be null.private final FacetDefinitionReader
Reader supplying the facets for iteration. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new iterator instance that iterates through the facets available from the argument. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
reader
Reader supplying the facets for iteration. -
loadCount
private int loadCountNumber of facets read from the reader. -
next
Next facet to return from the instance; may be null.
-
-
Constructor Details
-
FacetDefinitionReaderIterator
FacetDefinitionReaderIterator(FacetDefinitionReader reader) Construct a new iterator instance that iterates through the facets available from the argument.- Parameters:
reader
- read supplying facets for iteration
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<FacetDefinition>
-
next
- Specified by:
next
in interfaceIterator<FacetDefinition>
-
ensureLoaded
private void ensureLoaded()Ensure that the instance has attempted to load at least one facet from the underlying reader. -
loadNext
private void loadNext()Load the next facet from the underlying reader.
-