MCPcopy Create free account
hub / github.com/amikey/java-design-patterns / App

Class App

visitor/src/main/java/com/iluwatar/visitor/App.java:15–27  ·  view source on GitHub ↗

Visitor pattern defines mechanism to apply operations on nodes in hierarchy. New operations can be added without altering the node interface. In this example there is a unit hierarchy beginning from Commander. This hierarchy is traversed by visitors. SoldierVisitor applies its operation on Soldiers

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected