Class LongHashSet.LongIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Long>
    Enclosing class:
    LongHashSet

    public final class LongHashSet.LongIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.Long>
    Iterator which supports unboxed access to the values via nextValue().
    • Constructor Summary

      Constructors 
      Constructor Description
      LongIterator()
      Create a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void findNext()  
      boolean hasNext()
      java.lang.Long next()
      long nextValue()
      Strongly typed alternative of Iterator.next() to avoid boxing.
      private int position​(long[] values)  
      int remaining()
      Returns number of remaining (not yet visited) elements.
      void remove()
      (package private) LongHashSet.LongIterator reset()  
      • 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
    • Field Detail

      • remaining

        private int remaining
      • positionCounter

        private int positionCounter
      • stopCounter

        private int stopCounter
      • isPositionValid

        private boolean isPositionValid
    • Constructor Detail

      • LongIterator

        public LongIterator()
        Create a new instance.
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.Long>
      • remaining

        public int remaining()
        Returns number of remaining (not yet visited) elements.
        Returns:
        number of remaining elements.
      • next

        public java.lang.Long next()
        Specified by:
        next in interface java.util.Iterator<java.lang.Long>
      • nextValue

        public long nextValue()
        Strongly typed alternative of Iterator.next() to avoid boxing.
        Returns:
        the next long value.
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.lang.Long>
      • findNext

        private void findNext()
      • position

        private int position​(long[] values)