world
Class Station

java.lang.Object
  extended byworld.WorldObject
      extended byworld.Station
Direct Known Subclasses:
Airport, BusStop, Harbour, TrainStation

public class Station
extends WorldObject

A station class. All stations derive from it.

Author:
Piotrek

Field Summary
private  int meanOfTransportation
          A mean of transportation supported by this station.
 
Fields inherited from class world.WorldObject
name
 
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 world.WorldObject
GetLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

meanOfTransportation

private int meanOfTransportation
A mean of transportation supported by this station.

Constructor Detail

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.
Method Detail

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)