de.hagenah.diplomacy.map
Class Coast

java.lang.Object
  extended by de.hagenah.diplomacy.map.Coast

public class Coast
extends java.lang.Object

The order is also the order for compareTo.


Field Summary
static int COAST_MAX
          Last real coast
static int COAST_MIN
          First real coast
static int EAST
          East coast, ec
static int LAND
          Land, mv
static int NORTH
          North coast, nc
static int SEA
          Sea, xc
static int SOUTH
          South coast, sc
static int WEST
          West coast, wc
 
Method Summary
static int getCoast(java.lang.String name)
          Returns the coast for a string.
static java.lang.String getCoastAbbreviation(int coast)
          Returns a short string for a coast.
static java.lang.String getCoastName(int coast)
          Returns a long string for a coast.
static java.lang.String getCoastShortName(int coast)
          Returns a short string for a coast.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAND

public static final int LAND
Land, mv

See Also:
Constant Field Values

SEA

public static final int SEA
Sea, xc

See Also:
Constant Field Values

EAST

public static final int EAST
East coast, ec

See Also:
Constant Field Values

NORTH

public static final int NORTH
North coast, nc

See Also:
Constant Field Values

SOUTH

public static final int SOUTH
South coast, sc

See Also:
Constant Field Values

WEST

public static final int WEST
West coast, wc

See Also:
Constant Field Values

COAST_MIN

public static final int COAST_MIN
First real coast

See Also:
Constant Field Values

COAST_MAX

public static final int COAST_MAX
Last real coast

See Also:
Constant Field Values
Method Detail

getCoast

public static int getCoast(java.lang.String name)
                    throws java.lang.IllegalArgumentException
Returns the coast for a string.

Parameters:
name - Name of the coast (mv, xc, nc, sc, wc, es, north coast, south coast, west coast, east coast).
Returns:
A value of the Coast enumeration.
Throws:
java.lang.IllegalArgumentException
See Also:
Coast

getCoastName

public static java.lang.String getCoastName(int coast)
                                     throws java.lang.IllegalArgumentException
Returns a long string for a coast.

Parameters:
coast - A value of the Coast enumeration.
Returns:
A string representation for the coast.
Throws:
java.lang.IllegalArgumentException
See Also:
Coast

getCoastShortName

public static java.lang.String getCoastShortName(int coast)
                                          throws java.lang.IllegalArgumentException
Returns a short string for a coast.

Parameters:
coast - A value of the Coast enumeration.
Returns:
A string representation for the coast.
Throws:
java.lang.IllegalArgumentException
See Also:
Coast

getCoastAbbreviation

public static java.lang.String getCoastAbbreviation(int coast)
                                             throws java.lang.IllegalArgumentException
Returns a short string for a coast.

Parameters:
coast - A value of the Coast enumeration.
Returns:
A string representation for the coast.
Throws:
java.lang.IllegalArgumentException
See Also:
Coast