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 Details

    • 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 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 interface Iterator<FacetDefinition>
    • next

      public FacetDefinition next()
      Specified by:
      next in interface 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.