world
Class Station
java.lang.Object
world.WorldObject
world.Station
- Direct Known Subclasses:
- Airport, BusStop, Harbour, TrainStation
- public class Station
- extends WorldObject
A station class. All stations derive from it.
- Author:
- Piotrek
Constructor Summary |
Station(Location location,
java.lang.String name,
int meanOfTransportation)
Constructor. |
Method Summary |
boolean |
equals(java.lang.Object other)
|
int |
GetMeanOfTransportation()
Gets a mean of transportation this station supports. |
boolean |
IsEqual(Station other)
Gets a boolean value indicating whether this and the other one stations are equal. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
meanOfTransportation
private int meanOfTransportation
- A mean of transportation supported by this station.
Station
public Station(Location location,
java.lang.String name,
int meanOfTransportation)
- Constructor.
- Parameters:
location
- A location of the new station.name
- A name of this station.meanOfTransportation
- A mean of transportation this station support.
GetMeanOfTransportation
public int GetMeanOfTransportation()
- Gets a mean of transportation this station supports.
- Returns:
- A mean of transportation this station supports.
IsEqual
public boolean IsEqual(Station other)
- Gets a boolean value indicating whether this and the other one stations are equal.
- Parameters:
other
- The other station to compare this one to.
- Returns:
- A boolean value indicating whether this and the other one stations are equal.
equals
public boolean equals(java.lang.Object other)
- See Also:
Object.equals(java.lang.Object)