Class HashMapLongInt
java.lang.Object
org.apache.sysds.runtime.compress.utils.HashMapLongInt
- All Implemented Interfaces:
Iterable<HashMapLongInt.KV>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintget(long key) iterator()intputIfAbsent(long key, int value) return -1 if there was no such key.intsize()toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
HashMapLongInt
public HashMapLongInt(int arrSize)
-
-
Method Details
-
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
- Specified by:
iteratorin interfaceIterable<HashMapLongInt.KV>
-
toString
-