randoop.util
Interface IMultiMap<T1,T2>

All Known Implementing Classes:
MultiMap, ReversibleMultiMap

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.


Method Summary
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

add

void add(T1 key,
         T2 value)
Precondition: the mapping key->value is not already in the map.

Parameters:
key - cannot be null.
value - cannot be null.

remove

void remove(T1 key,
            T2 value)
Precondition: the mapping key->value is in the map.

Parameters:
key - cannot be null.
value - cannot be null.

getValues

Set<T2> getValues(T1 key)
Returns the values that the given key maps to.

Parameters:
key - cannot be null.

keySet

Set<T1> keySet()
Returns the set of keys in this map (the domain).


size

int size()
Returns the size of this map: the number of mappings.


toString

String toString()
Returns a String representation of this map.

Overrides:
toString in class Object