world
Class MeanOfTransportation

java.lang.Object
  extended byworld.MeanOfTransportation

public final class MeanOfTransportation
extends java.lang.Object

A mean of transportation.

Author:
Piotrek

Field Summary
static int AIRPLANE
          An airplane.
static int BUS
          A bus.
static int SHIP
          A ship.
static int TAXI
          A taxi.
static int TRAIN
          A train.
static int WALK
          A walk.
 
Constructor Summary
MeanOfTransportation()
           
 
Method Summary
static int GetMeanOfTransportationCode(java.lang.String meanOfTransportation)
          Gets a mean of transportation basing on the given name.
static java.lang.String GetMeanOfTransportationString(int meanOfTransportation)
          Gets a string with the name of the given mean of transportation.
static boolean IsValidMeanOfTransportation(int meanOfTransportation)
          Checks whether the given mean of transportation is a valid one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AIRPLANE

public static final int AIRPLANE
An airplane.

See Also:
Constant Field Values

TRAIN

public static final int TRAIN
A train.

See Also:
Constant Field Values

BUS

public static final int BUS
A bus.

See Also:
Constant Field Values

SHIP

public static final int SHIP
A ship.

See Also:
Constant Field Values

TAXI

public static final int TAXI
A taxi.

See Also:
Constant Field Values

WALK

public static final int WALK
A walk.

See Also:
Constant Field Values
Constructor Detail

MeanOfTransportation

public MeanOfTransportation()
Method Detail

IsValidMeanOfTransportation

public static boolean IsValidMeanOfTransportation(int meanOfTransportation)
Checks whether the given mean of transportation is a valid one.

Parameters:
meanOfTransportation - A value to be tested.
Returns:
A bool value indicating whether the given value is a valid mean of transportation.

GetMeanOfTransportationCode

public static int GetMeanOfTransportationCode(java.lang.String meanOfTransportation)
Gets a mean of transportation basing on the given name.

Parameters:
meanOfTransportation - A name of a mean of transportation to get code for.
Returns:
A mean of transportation code for the given name.

GetMeanOfTransportationString

public static java.lang.String GetMeanOfTransportationString(int meanOfTransportation)
Gets a string with the name of the given mean of transportation.

Parameters:
meanOfTransportation - A mean of transportation to get the name for.
Returns:
A string with the name of the given mean of transportation.