MetaDone
metadone.util.BiDir< A, B > Class Reference
Collaboration diagram for metadone.util.BiDir< A, B >:

List of all members.

Public Member Functions

void add (A a, B b)
Set< A > getA (B b)
Set< B > getB (A a)
void remove (A a, B b)
void clear ()
Set< Pair< A, B > > getSet ()
boolean contains (A a, B b)

Private Attributes

final HashSet< Pair< A, B > > set = new HashSet<Pair<A, B>>()

Detailed Description

Author:
ven

Manage a set of pairs with bidirectional access.

Date=31-mai-07 - 18:29:12

Filename = BiDir.java


Member Function Documentation

void metadone.util.BiDir< A, B >.add ( a,
b 
)

Add the pair (a,b) to the set.

Parameters:
a
b
void metadone.util.BiDir< A, B >.clear ( )

Clears the content of the store.

boolean metadone.util.BiDir< A, B >.contains ( a,
b 
)
Parameters:
a
b
Returns:
true iff the set contains the pair (a,b)
Set<A> metadone.util.BiDir< A, B >.getA ( b)
Parameters:
b
Returns:
the A such that (A,b) is in the set.

References metadone.util.Pair< A, B >.getFirst().

Set<B> metadone.util.BiDir< A, B >.getB ( a)
Parameters:
a
Returns:
the B such that (a,B) is in the set

References metadone.util.Pair< A, B >.getSecond().

Set<Pair<A, B> > metadone.util.BiDir< A, B >.getSet ( )
Returns:
an unmodifiable set of all the pairs.
void metadone.util.BiDir< A, B >.remove ( a,
b 
)

Removes the pair (a,b) from the store.

Parameters:
a
b

Member Data Documentation

final HashSet<Pair<A, B> > metadone.util.BiDir< A, B >.set = new HashSet<Pair<A, B>>() [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations