Class PrimitiveLongCollections.PrimitiveLongBaseIterator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long next  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract boolean fetchNext()
      Fetches the next item in this iterator.
      boolean hasNext()  
      long next()  
      protected boolean next​(long nextItem)
      Called from inside an implementation of fetchNext() if a next item was found.
      • Methods inherited from class java.lang.Object

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

      • next

        protected long next
    • Constructor Detail

      • PrimitiveLongBaseIterator

        public PrimitiveLongBaseIterator()
    • Method Detail

      • fetchNext

        protected abstract boolean fetchNext()
        Fetches the next item in this iterator. Returns whether or not a next item was found. If a next item was found, that value must have been set inside the implementation of this method using next(long).
      • next

        protected boolean next​(long nextItem)
        Called from inside an implementation of fetchNext() if a next item was found. This method returns true so that it can be used in short-hand conditionals (TODO what are they called?), like:
         protected boolean fetchNext()
         {
             return source.hasNext() ? next( source.next() ) : false;
         }
         
        Parameters:
        nextItem - the next item found.