rcf.core.util.groups
Class PairBAdapter<A,B>

java.lang.Object
  extended by rcf.core.util.adapter.AbstractTypeAdapter<B,PairInterface<A,B>>
      extended by rcf.core.util.groups.PairBAdapter<A,B>
Type Parameters:
A - The first type argument (the one being ignored) for the pairs.
B - The second type argument (the one being adapted) for the pairs.
All Implemented Interfaces:
rcf.core.util.adapter.TypeAdapter<B,PairInterface<A,B>>, rcf.core.util.adapter.TypeAdapterA<B,PairInterface<A,B>>, rcf.core.util.adapter.TypeAdapterB<B,PairInterface<A,B>>

@Revision(value="$Revision: 1.4 $",
          date="$Date: 2006/11/10 00:09:17 $",
          tag="$Name:  $")
public class PairBAdapter<A,B>
extends rcf.core.util.adapter.AbstractTypeAdapter<B,PairInterface<A,B>>

TODO: Javadoc Designed to adapt from the first field of a pair to a complete pair.

TODO: Unit tests, Code review, Javadoc review, Seal/Finalize

Version:
$Revision: 1.4 $
Author:
Greg Gibeling

Field Summary
protected static SoftReference<PairBAdapter> singleton
          TODO: Javadoc
protected  rcf.core.util.adapter.TypeAdapterB<A,B> typeAdapterB
          TODO: Javadoc The adapter which will supply the B values for new pairs.
 
Fields inherited from class rcf.core.util.adapter.AbstractTypeAdapter
adapterInverse
 
Constructor Summary
PairBAdapter(rcf.core.util.adapter.TypeAdapterB<A,B> _typeAdapterB)
          TODO: Javadoc
 
Method Summary
 boolean equals(Object o)
           
static
<A,B> PairBAdapter<A,B>
getPairBAdapter()
          TODO: Javadoc
 int hashCode()
           
 PairInterface<A,B> mapA(B a)
           
 B mapB(PairInterface<A,B> b)
           
 String toString()
           
 
Methods inherited from class rcf.core.util.adapter.AbstractTypeAdapter
typeAdapterInverse
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

singleton

protected static SoftReference<PairBAdapter> singleton
TODO: Javadoc


typeAdapterB

protected final rcf.core.util.adapter.TypeAdapterB<A,B> typeAdapterB
TODO: Javadoc The adapter which will supply the B values for new pairs.

Constructor Detail

PairBAdapter

public PairBAdapter(rcf.core.util.adapter.TypeAdapterB<A,B> _typeAdapterB)
TODO: Javadoc

Method Detail

getPairBAdapter

public static final <A,B> PairBAdapter<A,B> getPairBAdapter()
TODO: Javadoc

Type Parameters:
A -
B -
Returns:

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

mapA

public PairInterface<A,B> mapA(B a)

mapB

public B mapB(PairInterface<A,B> b)

toString

public String toString()
Overrides:
toString in class Object