Class HashMapLongInt
- java.lang.Object
-
- org.apache.sysds.runtime.compress.utils.HashMapLongInt
-
- All Implemented Interfaces:
Iterable<HashMapLongInt.KV>
public class HashMapLongInt extends Object implements Iterable<HashMapLongInt.KV>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
HashMapLongInt.KV
-
Constructor Summary
Constructors Constructor Description HashMapLongInt(int arrSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get(long key)
Iterator<HashMapLongInt.KV>
iterator()
int
putIfAbsent(long key, int value)
return -1 if there was no such key.int
size()
String
toString()
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
size
public int size()
-
putIfAbsent
public int putIfAbsent(long key, int value)
return -1 if there was no such key.- Parameters:
key
- the key to addvalue
- The value for that key.- Returns:
- -1 if there was no such key, otherwise the value
-
get
public int get(long key)
-
iterator
public Iterator<HashMapLongInt.KV> iterator()
- Specified by:
iterator
in interfaceIterable<HashMapLongInt.KV>
-
-