Package it.unimi.dsi.fastutil.objects
Class AbstractObject2IntMap.BasicEntry<K>
- java.lang.Object
-
- it.unimi.dsi.fastutil.objects.AbstractObject2IntMap.BasicEntry<K>
-
- All Implemented Interfaces:
Object2IntMap.Entry<K>
,java.util.Map.Entry<K,java.lang.Integer>
- Enclosing class:
- AbstractObject2IntMap<K>
public static class AbstractObject2IntMap.BasicEntry<K> extends java.lang.Object implements Object2IntMap.Entry<K>
This class provides a basic but complete type-specific entry class for all those maps implementations that do not have entries on their own (e.g., most immutable maps).This class does not implement
setValue()
, as the modification would not be reflected in the base map.
-
-
Constructor Summary
Constructors Constructor Description BasicEntry()
BasicEntry(K key, int value)
BasicEntry(K key, java.lang.Integer value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
getIntValue()
Returns the value corresponding to this entry.K
getKey()
int
hashCode()
int
setValue(int value)
Replaces the value corresponding to this entry with the specified value (optional operation).java.lang.String
toString()
-
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2IntMap.Entry
getValue, setValue
-
-
-
-
Method Detail
-
getKey
public K getKey()
- Specified by:
getKey
in interfacejava.util.Map.Entry<K,java.lang.Integer>
-
getIntValue
public int getIntValue()
Description copied from interface:Object2IntMap.Entry
Returns the value corresponding to this entry.- Specified by:
getIntValue
in interfaceObject2IntMap.Entry<K>
- See Also:
Map.Entry.getValue()
-
setValue
public int setValue(int value)
Description copied from interface:Object2IntMap.Entry
Replaces the value corresponding to this entry with the specified value (optional operation).- Specified by:
setValue
in interfaceObject2IntMap.Entry<K>
- See Also:
Map.Entry.setValue(Object)
-
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals
in interfacejava.util.Map.Entry<K,java.lang.Integer>
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Map.Entry<K,java.lang.Integer>
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-