|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IMultiMap<T1,T2>
Represents a relation from a set of T1s (the keys) to another set of T2s (the values). In partucular, each key maps to a set of values.
| Modifier and Type | Method and Description |
|---|---|
void |
add(T1 key,
T2 value)
Precondition: the mapping key->value is not already in the map. |
Set<T2> |
getValues(T1 key)
Returns the values that the given key maps to. |
Set<T1> |
keySet()
Returns the set of keys in this map (the domain). |
void |
remove(T1 key,
T2 value)
Precondition: the mapping key->value is in the map. |
int |
size()
Returns the size of this map: the number of mappings. |
String |
toString()
Returns a String representation of this map. |
| Method Detail |
|---|
void add(T1 key,
T2 value)
key - cannot be null.value - cannot be null.
void remove(T1 key,
T2 value)
key - cannot be null.value - cannot be null.Set<T2> getValues(T1 key)
key - cannot be null.Set<T1> keySet()
int size()
String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||