|
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.state.Handler
class Handler
The handler class is used to perform the actual state change
when the step
sequence value goes from even to
odd or vice versa.
StepSequence.Factory.create(int, int)
Field Summary | |
---|---|
private StepSequenceImpl |
sequence
The current sequence target. |
Constructor Summary | |
---|---|
Handler(int step,
int value)
Constructor. |
Method Summary | |
---|---|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
String |
toString()
Returns the string representation of this handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private StepSequenceImpl sequence
This represents the current state.
Never null.
Constructor Detail |
---|
Handler(int step, int value)
step
- The step; cannot be zero.value
- The initial sequence value.
IllegalArgumentException
- If step
is zero.Method Detail |
---|
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public String toString()
toString
in class Object
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |