Package rea.components
Class Passage
java.lang.Object
rea.components.Component
rea.components.Positionable
rea.components.Passage
- All Implemented Interfaces:
Element
A way to a place. For instance, a door to a room, or a path to a forest.
- Author:
- José Paulo Leal
jpleal@dc.fc.up.pt
- Implementation Note:
- corresponds to a Leaf in the Composite design pattern.
-
Field Summary
Fields inherited from class rea.components.Component
description, visual
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class rea.components.Positionable
getPosition, moveTo
Methods inherited from class rea.components.Component
getDescription, getVisual, toString
-
Constructor Details
-
Passage
Create a passage to a place.- Parameters:
visual
- showing the passagedescription
- of the passageplace
- to which the passage leads
-
-
Method Details
-
getPlace
The place to which this passage leads.- Returns:
- the place to which this passage leads
-
accept
Accept a visitor.- Parameters:
visitor
- the visitor to accept
-