Package microsim.data
Class MultiKeyHashMap
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Integer,
MultiKeyHashMap.EntryValue>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(@NonNull Object @NonNull ... keyArray) Searches through all the keys@NonNull Object[]
int
getHashKey
(@NonNull Object @NonNull [] keyArray) Calculates the total sum of all hashcodes as if they were simple integers.@NonNull Object[]
Adds@NonNull Object[]
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
MultiKeyHashMap
public MultiKeyHashMap()
-
-
Method Details
-
getHashKey
Calculates the total sum of all hashcodes as if they were simple integers.- Parameters:
keyArray
- An array of keys which are used for further calculations of hashcodes.- Returns:
- The total sum of all hashcodes.
- Throws:
NullPointerException
- when the input array or any of its elements isnull
.
-
containsKey
Searches through all the keys- Parameters:
keyArray
-- Returns:
-
put
@NonNull public @NonNull Object[] put(@NonNull @NonNull Object[] keyArray, @NonNull @NonNull Object[] valueArray) Adds- Parameters:
keyArray
-valueArray
-- Returns:
-
remove
-
get
-