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

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

@Revision(value="$Revision: 1.7 $",
          date="$Date: 2006/11/14 18:56:27 $",
          tag="$Name:  $")
public class ImmutableSingletonAAdapter<A>
extends rcf.core.util.adapter.AbstractTypeAdapter<A,ImmutableSingletonInterface<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<ImmutableSingletonAAdapter> singleton
          TODO: Javadoc The singleton instance of this class.
 
Fields inherited from class rcf.core.util.adapter.AbstractTypeAdapter
adapterInverse
 
Constructor Summary
private ImmutableSingletonAAdapter()
          Default constructor, private to enforce singleton instantiation.
 
Method Summary
 ImmutableSingletonAAdapter<A> copy()
           
 boolean equals(Object o)
           
static
<A> ImmutableSingletonAAdapter<A>
getImmutableSingletonAAdapter()
          TODO: Javadoc Get the singleton instance of this class.
 int hashCode()
           
 ImmutableSingletonInterface<A> mapA(A a)
           
 A mapB(ImmutableSingletonInterface<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<ImmutableSingletonAAdapter> singleton
TODO: Javadoc The singleton instance of this class.

Constructor Detail

ImmutableSingletonAAdapter

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

See Also:
#getIdentityAdapter()
Method Detail

getImmutableSingletonAAdapter

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

Returns:
The singleton instance of this class.

mapA

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

mapB

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

copy

public ImmutableSingletonAAdapter<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