HashMap2
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<MapKey2<K1,K2>,V>
-
- com.dashoptimization.maps.HashMap2<K1,K2,V>
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<MapKey2<K1,K2>,V>
public final class HashMap2<K1,K2,V> extends java.util.HashMap<MapKey2<K1,K2>,V>
A 2-dimensional hash map. Instances of this class map tuples with 2 elements to value and provide some convenience functions to access elements without having to explicitly construct the tuples. Tuples are mapped using their hash codes.- Since:
- 43.00
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructor Description HashMap2()
-
Method Summary
Modifier and Type Method Description boolean
containsKey(K1 key1, K2 key2)
Test whether(key1,key2)
exists.V
get(K1 key1, K2 key2)
Get the value for tuple(key1,key2)
.V
put(K1 key1, K2 key2, V value)
Map(key1,key2)
tovalue
.
-
-
-
Method Detail
-
get
public V get(K1 key1, K2 key2)
Get the value for tuple(key1,key2)
.- Parameters:
-
key1
- Key for dimension 1. -
key2
- Key for dimension 2. - Returns:
-
null
the mapping does not exist. - Since:
- 43.00
-
put
public V put(K1 key1, K2 key2, V value)
Map(key1,key2)
tovalue
.- Parameters:
-
key1
- Key for dimension 1. -
key2
- Key for dimension 2. -
value
- The value for(key1,key2)
. - Returns:
- the previous value for the mapping.
- Since:
- 43.00
-
-
© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.