Class AbstractBoundaryReadHandler3D.FacetDefinitionReaderIterator
- java.lang.Object
-
- org.apache.commons.geometry.io.euclidean.threed.AbstractBoundaryReadHandler3D.FacetDefinitionReaderIterator
-
- All Implemented Interfaces:
java.util.Iterator<FacetDefinition>
- Enclosing class:
- AbstractBoundaryReadHandler3D
static final class AbstractBoundaryReadHandler3D.FacetDefinitionReaderIterator extends java.lang.Object implements java.util.Iterator<FacetDefinition>
Class exposing aFacetDefinitionReader
as an iterator.
-
-
Field Summary
Fields Modifier and Type Field Description private int
loadCount
Number of facets read from the reader.private FacetDefinition
next
Next facet to return from the instance; may be null.private FacetDefinitionReader
reader
Reader supplying the facets for iteration.
-
Constructor Summary
Constructors Constructor Description FacetDefinitionReaderIterator(FacetDefinitionReader reader)
Construct a new iterator instance that iterates through the facets available from the argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
ensureLoaded()
Ensure that the instance has attempted to load at least one facet from the underlying reader.boolean
hasNext()
private void
loadNext()
Load the next facet from the underlying reader.FacetDefinition
next()
-
-
-
Field Detail
-
reader
private final FacetDefinitionReader reader
Reader supplying the facets for iteration.
-
loadCount
private int loadCount
Number of facets read from the reader.
-
next
private FacetDefinition next
Next facet to return from the instance; may be null.
-
-
Constructor Detail
-
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 Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<FacetDefinition>
-
next
public FacetDefinition next()
- Specified by:
next
in interfacejava.util.Iterator<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.
-
-