Class YLongToIntMap
- java.lang.Object
-
- de.hybris.platform.util.collections.fast.YLongToIntMap
-
public class YLongToIntMap extends java.lang.Object
Map which maps key of primitive type long to value of primitive type int.
-
-
Constructor Summary
Constructors Constructor Description YLongToIntMap()
Creates an empty map.YLongToIntMap(int initialCapacity)
Creates an empty map with preallocated space for entries.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get(long key)
Gets a value mapped by a given key.int
getEmptyValue()
int
put(long key, int value)
Puts a mapping between given key and given value to the map.int
remove(long key)
Removes mapping mapped by given key.
-
-
-
Method Detail
-
getEmptyValue
public int getEmptyValue()
- Returns:
- "empty value"
- See Also:
put(long, int)
,get(long)
-
put
public int put(long key, int value)
Puts a mapping between given key and given value to the map.- Parameters:
key
- key of the mappingvalue
- value of the mapping- Returns:
- previous value of the key, or an
empty value
if there was no given key in the map. - See Also:
getEmptyValue()
-
get
public int get(long key)
Gets a value mapped by a given key.- Parameters:
key
- key of the mapping- Returns:
- value associated with given key or an
empty value
if there is no given key in the map
-
remove
public int remove(long key)
Removes mapping mapped by given key.- Parameters:
key
- key of the mapping- Returns:
- value of removed key, or an
empty value
if there was no given key in the map.
-
-