Class SimpleTriangleMesh.FaceIterator<T>

  • Type Parameters:
    T - Type returned by the iterator
    All Implemented Interfaces:
    java.util.Iterator<T>
    Enclosing class:
    SimpleTriangleMesh

    private final class SimpleTriangleMesh.FaceIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<T>
    Internal class for iterating through the mesh faces and extracting a value from each.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.function.Function<? super TriangleMesh.Face,​T> fn
      Function to apply to each face in the mesh.
      private int index
      The current index of the iterator.
    • Constructor Summary

      Constructors 
      Constructor Description
      FaceIterator​(java.util.function.Function<? super TriangleMesh.Face,​T> fn)
      Construct a new instance for iterating through the mesh faces and extracting a value from each.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      T next()
      • 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 Detail

      • index

        private int index
        The current index of the iterator.
      • fn

        private final java.util.function.Function<? super TriangleMesh.Face,​T> fn
        Function to apply to each face in the mesh.
    • Constructor Detail

      • FaceIterator

        FaceIterator​(java.util.function.Function<? super TriangleMesh.Face,​T> fn)
        Construct a new instance for iterating through the mesh faces and extracting a value from each.
        Parameters:
        fn - function to apply to each face in order to obtain the iterated value
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>