rcf.core.util.groups
Class SingletonAAdapter<A>

java.lang.Object
  extended by rcf.core.util.adapter.AbstractTypeAdapter<A,SingletonInterface<A>>
      extended by rcf.core.util.groups.SingletonAAdapter<A>
Type Parameters:
A - The type argument for the singletons.
All Implemented Interfaces:
rcf.core.util.adapter.TypeAdapter<A,SingletonInterface<A>>, rcf.core.util.adapter.TypeAdapterA<A,SingletonInterface<A>>, rcf.core.util.adapter.TypeAdapterB<A,SingletonInterface<A>>, rcf.core.util.Copyable

@Revision(value="$Revision: 1.7 $",
          date="$Date: 2006/11/14 18:56:27 $",
          tag="$Name:  $")
public class SingletonAAdapter<A>
extends rcf.core.util.adapter.AbstractTypeAdapter<A,SingletonInterface<A>>
implements rcf.core.util.Copyable

TODO: Javadoc Designed to adapt from the payload of a singleton to a complete singleton.

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

Version:
$Revision: 1.7 $
Author:
Greg Gibeling

Field Summary
private static SoftReference<SingletonAAdapter> singleton
          TODO: Javadoc The singleton instance of this class.
 
Fields inherited from class rcf.core.util.adapter.AbstractTypeAdapter
adapterInverse
 
Constructor Summary
private SingletonAAdapter()
          Default constructor, private to enforce singleton instantiation.
 
Method Summary
 SingletonAAdapter<A> copy()
           
 boolean equals(Object o)
           
static
<A> SingletonAAdapter<A>
getSingletonAAdapter()
          TODO: Javadoc Get the singleton instance of this class.
 int hashCode()
           
 SingletonInterface<A> mapA(A a)
           
 A mapB(SingletonInterface<A> 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

private static SoftReference<SingletonAAdapter> singleton
TODO: Javadoc The singleton instance of this class.

Constructor Detail

SingletonAAdapter

private SingletonAAdapter()
Default constructor, private to enforce singleton instantiation.

See Also:
#getIdentityAdapter()
Method Detail

getSingletonAAdapter

public static final <A> SingletonAAdapter<A> getSingletonAAdapter()
TODO: Javadoc Get the singleton instance of this class.

Returns:
The singleton instance of this class.

mapA

public SingletonInterface<A> mapA(A a)
Specified by:
mapA in interface rcf.core.util.adapter.TypeAdapterA<A,SingletonInterface<A>>

mapB

public A mapB(SingletonInterface<A> b)
Specified by:
mapB in interface rcf.core.util.adapter.TypeAdapterB<A,SingletonInterface<A>>

copy

public SingletonAAdapter<A> copy()
Specified by:
copy in interface rcf.core.util.Copyable

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object