Class AbstractBSPTree.NodeIterator<P extends Point<P>,​N extends AbstractBSPTree.AbstractNode<P,​N>>

  • Type Parameters:
    P - Point implementation type
    N - Node implementation type
    All Implemented Interfaces:
    java.util.Iterator<N>
    Enclosing class:
    AbstractBSPTree<P extends Point<P>,​N extends AbstractBSPTree.AbstractNode<P,​N>>

    private static final class AbstractBSPTree.NodeIterator<P extends Point<P>,​N extends AbstractBSPTree.AbstractNode<P,​N>>
    extends java.lang.Object
    implements java.util.Iterator<N>
    Class for iterating through the nodes in a BSP subtree.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Deque<N> stack
      The current node stack.
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeIterator​(N subtreeRoot)
      Create a new instance for iterating over the nodes in the given subtree.
    • Method Summary

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

      • NodeIterator

        NodeIterator​(N subtreeRoot)
        Create a new instance for iterating over the nodes in the given subtree.
        Parameters:
        subtreeRoot - the root node of the subtree to iterate
    • Method Detail

      • hasNext

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

        public N next()
        Specified by:
        next in interface java.util.Iterator<P extends Point<P>>