Package elki.result

Class Metadata.Hierarchy.ItrAnc

  • All Implemented Interfaces:
    It<java.lang.Object>, Iter
    Enclosing class:
    Metadata.Hierarchy

    private class Metadata.Hierarchy.ItrAnc
    extends java.lang.Object
    implements It<java.lang.Object>
    Iterator over all ancestors.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.Object extra
      Additional object to return as first result.
      (package private) It<java.lang.Object> parentiter
      Iterator over children
      (package private) It<java.lang.Object> subiter
      Iterator of current child
    • Constructor Summary

      Constructors 
      Constructor Description
      ItrAnc()
      Constructor for descendants-only.
      ItrAnc​(java.lang.Object extra)
      Constructor with additional element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      It<java.lang.Object> advance()
      Moves the iterator forward to the next entry.
      java.lang.Object get()
      Access the current object.
      private boolean lookahead()  
      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

      • parentiter

        final It<java.lang.Object> parentiter
        Iterator over children
      • subiter

        It<java.lang.Object> subiter
        Iterator of current child
      • extra

        java.lang.Object extra
        Additional object to return as first result.
    • Constructor Detail

      • ItrAnc

        ItrAnc()
        Constructor for descendants-only.
      • ItrAnc

        ItrAnc​(java.lang.Object extra)
        Constructor with additional element.
        Parameters:
        extra - Additional element (cannot be null).
    • 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.
      • advance

        public It<java.lang.Object> advance()
        Description copied from interface: Iter
        Moves the iterator forward to the next entry.
        Specified by:
        advance in interface It<java.lang.Object>
        Specified by:
        advance in interface Iter
        Returns:
        The iterator itself.
      • lookahead

        private boolean lookahead()
      • get

        public java.lang.Object get()
        Description copied from interface: It
        Access the current object.
        Specified by:
        get in interface It<java.lang.Object>
        Returns:
        Current object