TUM CCSM Commons

edu.tum.cs.commons.collections
Class IdentityPairMap<T,V>

java.lang.Object
  extended by edu.tum.cs.commons.collections.IdentityPairMap<T,V>

public class IdentityPairMap<T,V>
extends java.lang.Object

A map using (unordered) pairs as key which are compared by reference.

Version:
$Rev: 26283 $
Author:
hummelb, $Author: juergens $
Rating:
GREEN Hash: 048446DAEE51D1CCA53E05BB3D4283F1

Constructor Summary
IdentityPairMap()
           
 
Method Summary
 void clear()
          Clears the map.
 boolean contains(ImmutablePair<T,T> pair)
          Returns whether the pair is contained.
 boolean contains(T t1, T t2)
          Returns whether the pair (t1, t2) is contained.
 V get(ImmutablePair<T,T> pair)
          Returns the element stored at the pair or null if not stored.
 V get(T t1, T t2)
          Returns the element stored at pair (t1, t2) or null if not stored.
 void put(ImmutablePair<T,T> pair, V value)
          Adds the given value for the given pair.
 void put(T t1, T t2, V value)
          Adds the given value for the given pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityPairMap

public IdentityPairMap()
Method Detail

put

public void put(ImmutablePair<T,T> pair,
                V value)
Adds the given value for the given pair.


put

public void put(T t1,
                T t2,
                V value)
Adds the given value for the given pair.


contains

public boolean contains(ImmutablePair<T,T> pair)
Returns whether the pair is contained.


contains

public boolean contains(T t1,
                        T t2)
Returns whether the pair (t1, t2) is contained.


get

public V get(ImmutablePair<T,T> pair)
Returns the element stored at the pair or null if not stored.


get

public V get(T t1,
             T t2)
Returns the element stored at pair (t1, t2) or null if not stored.


clear

public void clear()
Clears the map.


TUM CCSM Commons

TUM CCSM Commons - 2.7