Class CFTree.LeafIterator<L extends ClusterFeature>

  • All Implemented Interfaces:
    Iter
    Enclosing class:
    CFTree<L extends ClusterFeature>

    public static class CFTree.LeafIterator<L extends ClusterFeature>
    extends java.lang.Object
    implements Iter
    Iterator over leaf nodes.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private L current
      Current leaf entry.
      private java.util.ArrayList<java.lang.Object> queue
      Queue of open ends.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private LeafIterator​(CFNode<L> root)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Iter advance()
      Moves the iterator forward to the next entry.
      L get()
      Get the current leaf.
      boolean valid()
      Returns true if the iterator currently points to a valid object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • queue

        private java.util.ArrayList<java.lang.Object> queue
        Queue of open ends.
    • Constructor Detail

      • LeafIterator

        private LeafIterator​(CFNode<L> root)
        Constructor.
        Parameters:
        root - Root node
    • Method Detail

      • valid

        public boolean valid()
        Description copied from interface: Iter
        Returns true if the iterator currently points to a valid object.
        Specified by:
        valid in interface Iter
        Returns:
        a boolean value, whether the position is valid.
      • get

        public L get()
        Get the current leaf.
        Returns:
        Current leaf (if valid, null otherwise).
      • advance

        public Iter advance()
        Description copied from interface: Iter
        Moves the iterator forward to the next entry.
        Specified by:
        advance in interface Iter
        Returns:
        The iterator itself.