|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectReversibleMultiMap<T1,T2>
public class ReversibleMultiMap<T1,T2> extends Object implements IMultiMap<T1,T2>
| Modifier and Type | Field and Description |
|---|---|
List<Integer> |
marks
|
static boolean |
verbose_log
|
| Constructor and Description |
|---|
ReversibleMultiMap()
|
| 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 |
mark()
|
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. |
void |
undoToLastMark()
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean verbose_log
public final List<Integer> marks
| Constructor Detail |
|---|
public ReversibleMultiMap()
| Method Detail |
|---|
public void add(T1 key,
T2 value)
IMultiMap
add in interface IMultiMap<T1,T2>key - cannot be null.value - cannot be null.
public void remove(T1 key,
T2 value)
IMultiMap
remove in interface IMultiMap<T1,T2>key - cannot be null.value - cannot be null.public void mark()
public void undoToLastMark()
public Set<T2> getValues(T1 key)
IMultiMap
getValues in interface IMultiMap<T1,T2>key - cannot be null.public Set<T1> keySet()
IMultiMap
keySet in interface IMultiMap<T1,T2>public int size()
IMultiMap
size in interface IMultiMap<T1,T2>public String toString()
IMultiMap
toString in interface IMultiMap<T1,T2>toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||