|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.rode.thesis.abstractfactory.PrototypicalFactory<Sequence<E>> dk.rode.thesis.abstractfactory.PrototypicalSequenceFactory<E>
E
- The type of values delivered by the created sequences.@ParticipantUsage(value="ConcreteProduct", type=Sequence.class) @Participant(value="ConcreteFactory") public class PrototypicalSequenceFactory<E>
A prototypical sequence factory creates sequences
based on a prototype supplied at construction time.
This factory is thread-safe.
StandardFactory
Constructor Summary | |
---|---|
PrototypicalSequenceFactory(Sequence<E> prototype)
Constructor. |
Method Summary | |
---|---|
Sequence<E> |
create()
Creates a new instance based on the prototypical object supplied at construction time. |
Sequence<E> |
createSequence(Void unused)
Creates a new initialised sequence instance. |
Methods inherited from class dk.rode.thesis.abstractfactory.PrototypicalFactory |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PrototypicalSequenceFactory(Sequence<E> prototype)
prototype
is copied and this factory keeps no reference
to it.
prototype
- The prototypical sequence to use; cannot be null.
NullPointerException
- If prototype
is null.Method Detail |
---|
public Sequence<E> create()
PrototypicalFactory
create
in class PrototypicalFactory<Sequence<E>>
public Sequence<E> createSequence(Void unused)
SequenceFactory
sequence
instance.
createSequence
in interface SequenceFactory<E,Void>
unused
- Never used.
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |