Class IntArrayQueue.IntIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Integer>
    Enclosing class:
    IntArrayQueue

    public final class IntArrayQueue.IntIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.Integer>
    Specialised Iterator from which the value can be retrieved without boxing via nextValue().
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int index  
    • Constructor Summary

      Constructors 
      Constructor Description
      IntIterator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      java.lang.Integer next()
      int nextValue()
      Get the next value from the iterator without boxing.
      (package private) IntArrayQueue.IntIterator 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, remove
    • Field Detail

      • index

        private int index
    • Constructor Detail

      • IntIterator

        public IntIterator()
    • Method Detail

      • hasNext

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

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

        public int nextValue()
        Get the next value from the iterator without boxing.
        Returns:
        the next value from the queue.