Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

dk.rode.thesis.abstractfactory
Class MemorizableAbstractionFactory<E>

java.lang.Object
  extended by dk.rode.thesis.abstractfactory.MemorizableAbstractionFactory<E>
Type Parameters:
E - The type of values delivered by the created abstractions.
All Implemented Interfaces:
AbstractionFactory<E>

@ParticipantUsage(value="ConcreteProduct",
                  type=MemorizableSequenceAbstraction.class)
@Participant(value="ConcreteFactory")
public class MemorizableAbstractionFactory<E>
extends Object
implements AbstractionFactory<E>

A memorizable abstraction factory creates memorizable sequence abstractions.

This factory is thread-safe.

Implementation notes:
The factory method use a covariant return type since the MemorizableSequenceAbstraction class offers new functionality compared to the SequenceAbstraction class.

Author:
Gunni Rode / rode.dk
See Also:
StandardAbstractionFactory, SynchronisedAbstractionFactory, PrototypicalAbstractionFactory

Constructor Summary
MemorizableAbstractionFactory()
          Constructor.
 
Method Summary
 MemorizableSequenceAbstraction<E> createAbstraction()
          Creates a new sequence abstraction instance.
 String toString()
          Returns the string representation of this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemorizableAbstractionFactory

public MemorizableAbstractionFactory()
Constructor.

Method Detail

createAbstraction

public MemorizableSequenceAbstraction<E> createAbstraction()
Description copied from interface: AbstractionFactory
Creates a new sequence abstraction instance.

Depending on the actual factory implementation, the returned abstraction may be initialised. If so, no implementation need be set.

Specified by:
createAbstraction in interface AbstractionFactory<E>
Returns:
A new sequence abstraction instance; never null.

toString

public String toString()
Returns the string representation of this factory.

Overrides:
toString in class Object
Returns:
The string representation; never null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.