|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--VASSAL.counters.PieceVisitorDispatcher
For implementing a modified Visitor pattern on GamePieces.
Rather than defining accept() methods in the GamePiece subclasses,
this class performs the dispatching of visitors. This allows for easier
implementation of custom GamePiece subclasses outside the core engine.
A class that wishes to recognize custom GamePiece classes and treat
them specially should do so by implementing a sub-interface of
PieceVisitor and using a subclass of PieceVisitorDispatcher
that recognizes the custom type.
DeckVisitor,
DeckVisitorDispatcher| Constructor Summary | |
PieceVisitorDispatcher(PieceVisitor visitor)
|
|
| Method Summary | |
java.lang.Object |
accept(GamePiece piece)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PieceVisitorDispatcher(PieceVisitor visitor)
| Method Detail |
public java.lang.Object accept(GamePiece piece)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||