Package org.agrona.collections
Class Int2IntHashMap.EntryIterator
- java.lang.Object
-
- org.agrona.collections.Int2IntHashMap.AbstractIterator
-
- org.agrona.collections.Int2IntHashMap.EntryIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.lang.Integer>>
,java.util.Map.Entry<java.lang.Integer,java.lang.Integer>
- Enclosing class:
- Int2IntHashMap
public final class Int2IntHashMap.EntryIterator extends Int2IntHashMap.AbstractIterator implements java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.lang.Integer>>, java.util.Map.Entry<java.lang.Integer,java.lang.Integer>
Iterator over entries which supports access to unboxed keys and values.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Int2IntHashMap.EntryIterator.MapEntry
AnMap.Entry
implementation.
-
Field Summary
-
Fields inherited from class org.agrona.collections.Int2IntHashMap.AbstractIterator
isPositionValid
-
-
Constructor Summary
Constructors Constructor Description EntryIterator()
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.Map.Entry<java.lang.Integer,java.lang.Integer>
allocateDuplicateEntry()
boolean
equals(java.lang.Object o)
int
getIntKey()
Returns the key of the current entry.int
getIntValue()
Returns the value of the current entry.java.lang.Integer
getKey()
java.lang.Integer
getValue()
int
hashCode()
java.util.Map.Entry<java.lang.Integer,java.lang.Integer>
next()
int
setValue(int value)
Sets the value of the current entry.java.lang.Integer
setValue(java.lang.Integer value)
-
Methods inherited from class org.agrona.collections.Int2IntHashMap.AbstractIterator
findNext, hasNext, keyPosition, remaining, remove, reset
-
-
-
-
Method Detail
-
getKey
public java.lang.Integer getKey()
- Specified by:
getKey
in interfacejava.util.Map.Entry<java.lang.Integer,java.lang.Integer>
-
getIntKey
public int getIntKey()
Returns the key of the current entry.- Returns:
- the key.
-
getValue
public java.lang.Integer getValue()
- Specified by:
getValue
in interfacejava.util.Map.Entry<java.lang.Integer,java.lang.Integer>
-
getIntValue
public int getIntValue()
Returns the value of the current entry.- Returns:
- the value.
-
setValue
public java.lang.Integer setValue(java.lang.Integer value)
- Specified by:
setValue
in interfacejava.util.Map.Entry<java.lang.Integer,java.lang.Integer>
-
setValue
public int setValue(int value)
Sets the value of the current entry.- Parameters:
value
- to be set.- Returns:
- previous value of the entry.
-
next
public java.util.Map.Entry<java.lang.Integer,java.lang.Integer> next()
- Specified by:
next
in interfacejava.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.lang.Integer>>
-
allocateDuplicateEntry
private java.util.Map.Entry<java.lang.Integer,java.lang.Integer> allocateDuplicateEntry()
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Map.Entry<java.lang.Integer,java.lang.Integer>
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Map.Entry<java.lang.Integer,java.lang.Integer>
- Overrides:
equals
in classjava.lang.Object
-
-