K1
- The type of the primary keys in this TripleKeyMapToListK2
- The type of the secondary keys in this TripleKeyMapToListK3
- The type of the tertiary keys in this TripleKeyMapToListV
- The type of the values in this TripleKeyMapToListpublic class TripleKeyMapToList<K1,K2,K3,V>
extends java.lang.Object
Constructor and Description |
---|
TripleKeyMapToList()
Constructs a new (empty) TripleKeyMapToList.
|
TripleKeyMapToList(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) TripleKeyMapToList.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllToListFor(K1 key1,
K2 key2,
K3 key3,
java.util.Collection<V> values)
Adds all of the Objects in the given list to the (internal) List for the
given keys.
|
void |
addToListFor(K1 key1,
K2 key2,
K3 key3,
V valueElement)
Adds the given value to the List for the given keys.
|
void |
clear()
Clears this TripleKeyMapToList.
|
boolean |
containsListFor(K1 key1,
K2 key2,
K3 key3)
Returns true if this TripleKeyMapToList contains a List for the given
keys.
|
boolean |
equals(java.lang.Object obj)
Returns true if the TripleKeyMapToList is equal to the given Object.
|
int |
firstKeyCount()
Returns the number of primary key maps contained by this
TripleKeyMapToList.
|
java.util.Set<K1> |
getKeySet()
Returns a Set which contains the primary keys for this
TripleKeyMapToList.
|
java.util.List<V> |
getListFor(K1 key1,
K2 key2,
K3 key3)
Returns a copy of the List contained in this TripleKeyMapToList for the
given keys.
|
java.util.Set<K2> |
getSecondaryKeySet(K1 key1)
Returns a Set which contains the secondary keys for the given primary key
within this TripleKeyMapToList.
|
java.util.Set<K3> |
getTertiaryKeySet(K1 key1,
K2 key2)
Returns a Set which contains the tertiary keys for the given primary key
within this TripleKeyMapToList.
|
int |
hashCode()
A consistent-with-equals hashCode for TripleKeyMapToList.
|
boolean |
isEmpty()
Returns true if the TripleKeyMapToList is empty
NOTE: This method checks whether this TripleKeyMapToList contains any
Lists for any key.
|
java.util.List<V> |
removeListFor(K1 key1,
K2 key2,
K3 key3)
Removes the List for the given keys.
|
MapToList<K3,V> |
removeListsFor(K1 key1,
K2 key2)
Removes the Lists for the given primary and secondary keys.
|
public TripleKeyMapToList()
public TripleKeyMapToList(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 TripleKeyMapToListcl2
- The Class to be used for the second of the underlying maps for
the TripleKeyMapToListcl3
- The Class to be used for the third of the underlying maps for
the TripleKeyMapToListjava.lang.IllegalArgumentException
- if any of the given Classes is null or does not have a zero
argument constructorpublic void addToListFor(K1 key1, K2 key2, K3 key3, V valueElement)
key1
- The primary key indicating which List the given object should
be added to.key2
- The secondary key indicating which List the given object
should be added to.key3
- The tertiary key indicating which List the given object should
be added to.valueElement
- The value to be added to the List for the given keys.public void addAllToListFor(K1 key1, K2 key2, K3 key3, java.util.Collection<V> values)
key1
- The primary key indicating which List the given object should
be added to.key2
- The secondary key indicating which List the given object
should be added to.key3
- The tertiary key indicating which List the given object should
be added to.values
- A Collection containing the items to be added to the List for
the given keys.public java.util.List<V> getListFor(K1 key1, K2 key2, K3 key3)
key1
- The primary key for retrieving the given Listkey2
- The secondary key for retrieving the given Listkey3
- The tertiary key for retrieving the given Listpublic boolean containsListFor(K1 key1, K2 key2, K3 key3)
key1
- The primary key for testing presence of a Listkey2
- The secondary key for testing presence of a Listkey3
- The tertiary key for testing presence of a Listpublic java.util.List<V> removeListFor(K1 key1, K2 key2, K3 key3)
key1
- The primary key indicating the List to removekey2
- The secondary key indicating the List to removekey3
- The tertiary key indicating the List to removepublic MapToList<K3,V> removeListsFor(K1 key1, K2 key2)
key1
- The primary key indicating the Lists to removekey2
- The secondary key indicating the Lists to removepublic java.util.Set<K1> getKeySet()
public java.util.Set<K2> getSecondaryKeySet(K1 key1)
key1
- The primary key to retrieve keys for.public java.util.Set<K3> getTertiaryKeySet(K1 key1, K2 key2)
key1
- The primary key used to identify the Tertiary Key Set in this
TripleKeyMapToList.key2
- The secondary key used to identify the Tertiary Key Set in
this TripleKeyMapToList.public void clear()
public boolean isEmpty()
public int firstKeyCount()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)