Class IntHashMap.KeysIterator

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

    private final class IntHashMap.KeysIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.Integer>
    class used to iterate on the keys of the map
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int bucketIndex  
      private int current  
      private boolean hasNext  
      private int index  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private KeysIterator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void findNext()
      find the next key
      boolean hasNext()  
      java.lang.Integer next()  
      void remove()  
      • 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

      • index

        private int index
      • bucketIndex

        private int bucketIndex
      • current

        private int current
      • hasNext

        private boolean hasNext
    • Constructor Detail

      • KeysIterator

        private KeysIterator()
    • 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>
      • remove

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

        private void findNext()
        find the next key