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