Class IntegerDBID.Itr

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int pos
      Iterator position: We use an integer so we can support retract().
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Itr()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IntegerDBID.Itr advance()
      Moves the iterator forward to the next entry.
      IntegerDBID.Itr advance​(int count)
      Moves the iterator forward or backward by the given offset.
      boolean equals​(java.lang.Object other)
      WARNING: calling equality on a reference may be an indicator of incorrect usage, as it is not clear whether the programmer meant the references to be the same or the DBIDs.
      int getOffset()
      Get current iterator offset.
      int hashCode()
      WARNING: Hash codes of this interface might not be stable (e.g., for iterators).
      int internalGetIndex()
      Internal only: Get the internal index.
      IntegerDBID.Itr retract()
      Moves the iterator backward to the previous entry.
      IntegerDBID.Itr seek​(int off)
      Moves the iterator to the given position
      java.lang.String toString()  
      boolean valid()
      Returns true if the iterator currently points to a valid object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • pos

        int pos
        Iterator position: We use an integer so we can support retract().
    • Constructor Detail

      • Itr

        protected Itr()
    • Method Detail

      • advance

        public IntegerDBID.Itr advance​(int count)
        Description copied from interface: ArrayIter
        Moves the iterator forward or backward by the given offset.
        Specified by:
        advance in interface ArrayIter
        Specified by:
        advance in interface DBIDArrayIter
        Parameters:
        count - offset to move forward or backwards
        Returns:
        Iterator
      • seek

        public IntegerDBID.Itr seek​(int off)
        Description copied from interface: ArrayIter
        Moves the iterator to the given position
        Specified by:
        seek in interface ArrayIter
        Specified by:
        seek in interface DBIDArrayIter
        Parameters:
        off - Seek offset
        Returns:
        Iterator
      • getOffset

        public int getOffset()
        Description copied from interface: ArrayIter
        Get current iterator offset.
        Specified by:
        getOffset in interface ArrayIter
        Returns:
        Iterator position
      • internalGetIndex

        public int internalGetIndex()
        Description copied from interface: DBIDRef
        Internal only: Get the internal index.

        NOT FOR PUBLIC USE - ELKI Optimization engine only.

        Specified by:
        internalGetIndex in interface DBIDRef
        Specified by:
        internalGetIndex in interface IntegerDBIDRef
        Returns:
        Internal index
      • 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.
      • hashCode

        public int hashCode()
        Description copied from interface: DBIDRef
        WARNING: Hash codes of this interface might not be stable (e.g., for iterators).

        Use DBIDUtil.deref(elki.database.ids.DBIDRef) to get an object with a stable hash code!

        Specified by:
        hashCode in interface DBIDRef
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        current hash code (may change!)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object