K1 - The Class of the primary key for this TripleKeyMapK2 - The Class of the secondary key for this TripleKeyMapK3 - The Class of the tertiary key for this TripleKeyMapV - The Class of the Value for this TripleKeyMappublic class TripleKeyMap<K1,K2,K3,V>
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
TripleKeyMap()
Constructs a new (empty) TripleKeyMap.
|
TripleKeyMap(java.lang.Class<? extends java.util.Map> cl1,
java.lang.Class<? extends java.util.Map> cl2,
java.lang.Class<? extends java.util.Map> cl3)
Constructs a new (empty) TripleKeyMap.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears this TripleKeyMap.
|
TripleKeyMap<K1,K2,K3,V> |
clone()
Clones this TripleKeyMap.
|
boolean |
containsKey(K1 key1,
K2 key2,
K3 key3)
Returns true if an object is stored in this TripleKeyMap for the given
keys.
|
boolean |
equals(java.lang.Object obj)
Returns true if the TripleKeyMap is equal to the given Object.
|
int |
firstKeyCount()
Returns the number of primary keys in this TripleKeyMap.
|
V |
get(K1 key1,
K2 key2,
K3 key3)
Gets an object from the TripleKeyMap.
|
java.util.Set<K1> |
getKeySet()
Returns a Set which contains the primary keys for this TripleKeyMap.
|
java.util.Set<K2> |
getSecondaryKeySet(K1 key1)
Returns a Set which contains the secondary keys for the given primary key
within this TripleKeyMap.
|
java.util.Set<K3> |
getTertiaryKeySet(K1 key1,
K2 key2)
Returns a Set which contains the tertiary keys for the given primary key
within this TripleKeyMap.
|
int |
hashCode()
A consistent-with-equals hashCode for TripleKeyMap.
|
boolean |
isEmpty()
Returns true if the TripleKeyMap is empty.
|
V |
put(K1 key1,
K2 key2,
K3 key3,
V value)
Puts a new object into the TripleKeyMap.
|
V |
remove(K1 key1,
K2 key2,
K3 key3)
Removes an object from the TripleKeyMap.
|
java.util.Set<V> |
values(K1 key1,
K2 key2)
Returns a Set of the values stored in this TripleKeyMap for the given
primary and secondary keys.
|
public TripleKeyMap()
public TripleKeyMap(java.lang.Class<? extends java.util.Map> cl1,
java.lang.Class<? extends java.util.Map> cl2,
java.lang.Class<? extends java.util.Map> cl3)
cl1 - The Class to be used for the first of the underlying maps for
the TripleKeyMapcl2 - The Class to be used for the second of the underlying maps for
the TripleKeyMapcl3 - The Class to be used for the third of the underlying maps for
the TripleKeyMapjava.lang.IllegalArgumentException - if any of the given Classes is null or does not have a public
zero argument constructorpublic V put(K1 key1, K2 key2, K3 key3, V value)
key1 - The primary key used to store the value in this TripleKeyMap.key2 - The secondary key used to store the value in this
TripleKeyMap.key3 - The tertiary key used to store the value in this TripleKeyMap.value - The value to be stored in this TripleKeyMap.public V get(K1 key1, K2 key2, K3 key3)
key1 - The primary key used to get the value in this TripleKeyMap.key2 - The secondary key used to get the value in this TripleKeyMap.key3 - The tertiary key used to get the value in this TripleKeyMap.public boolean containsKey(K1 key1, K2 key2, K3 key3)
key1 - The primary key to be tested for containing a value in this
TripleKeyMap.key2 - The secondary key to be tested for containing a value in this
TripleKeyMap.key3 - The tertiary key to be tested for containing a value in this
TripleKeyMap.public V remove(K1 key1, K2 key2, K3 key3)
key1 - The primary key used to remove the value in this TripleKeyMap.key2 - The secondary key used to remove the value in this
TripleKeyMap.key3 - The tertiary key used to remove the value in this
TripleKeyMap.public java.util.Set<K1> getKeySet()
public java.util.Set<K2> getSecondaryKeySet(K1 key1)
key1 - The primary key used to identify the secondary Key Set in this
TripleKeyMap.public java.util.Set<K3> getTertiaryKeySet(K1 key1, K2 key2)
key1 - The primary key used to identify the Tertiary Key Set in this
TripleKeyMap.key2 - The secondary key used to identify the Tertiary Key Set in
this TripleKeyMap.public void clear()
public boolean isEmpty()
public int firstKeyCount()
public TripleKeyMap<K1,K2,K3,V> clone() throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - in the rare case that the super class actually throws the
exceptionpublic java.util.Set<V> values(K1 key1, K2 key2)
key1 - The primary key for which the values will be returnedkey2 - The secondary key for which the values will be returnedpublic int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)