public static interface Vehicle.Visitor
Visitor interface for the visitor pattern.| Modifier and Type | Method and Description |
|---|---|
void |
visit(Coach coach)
Draws the
Coach. |
void |
visit(Locomotive locomotive)
Draws the
Locomotive. |
void |
visit(PassengerCoach passengerCoach)
Draws the
PassengerCoach given by the parameter. |
void visit(Locomotive locomotive)
Locomotive.locomotive - to be drawnvoid visit(Coach coach)
Coach.coach - to be drawnvoid visit(PassengerCoach passengerCoach)
PassengerCoach given by the parameter.passengerCoach - to be drawn