Class Object2IntHashMap.EntryIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.util.Map.Entry<K,​java.lang.Integer>>, java.util.Map.Entry<K,​java.lang.Integer>
    Enclosing class:
    Object2IntHashMap<K>

    public final class Object2IntHashMap.EntryIterator
    extends Object2IntHashMap.AbstractIterator<java.util.Map.Entry<K,​java.lang.Integer>>
    implements java.util.Map.Entry<K,​java.lang.Integer>
    Iterator over entries which can provide unboxed access and optionally avoid allocation.
    • Constructor Detail

      • EntryIterator

        public EntryIterator()
    • Method Detail

      • next

        public java.util.Map.Entry<K,​java.lang.Integer> next()
        Specified by:
        next in interface java.util.Iterator<java.util.Map.Entry<K,​java.lang.Integer>>
        Specified by:
        next in class Object2IntHashMap.AbstractIterator<java.util.Map.Entry<K,​java.lang.Integer>>
      • allocateDuplicateEntry

        private java.util.Map.Entry<K,​java.lang.Integer> allocateDuplicateEntry()
      • getKey

        public K getKey()
        Specified by:
        getKey in interface java.util.Map.Entry<K,​java.lang.Integer>
      • getIntValue

        public int getIntValue()
        Get int value without boxing.
        Returns:
        value.
      • getValue

        public java.lang.Integer getValue()
        Specified by:
        getValue in interface java.util.Map.Entry<K,​java.lang.Integer>
      • setValue

        public java.lang.Integer setValue​(java.lang.Integer value)
        Specified by:
        setValue in interface java.util.Map.Entry<K,​java.lang.Integer>
      • setValue

        public int setValue​(int value)
        Set value at current position without boxing.
        Parameters:
        value - to be set.
        Returns:
        old value.
        Throws:
        java.lang.IllegalArgumentException - if missingValue == value.
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map.Entry<K,​java.lang.Integer>
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Specified by:
        equals in interface java.util.Map.Entry<K,​java.lang.Integer>
        Overrides:
        equals in class java.lang.Object