ch.sahits.game.openpatrician.model.weapon
Enum EWeapon

java.lang.Object
  extended by java.lang.Enum<EWeapon>
      extended by ch.sahits.game.openpatrician.model.weapon.EWeapon
All Implemented Interfaces:
IAmountable, IWeapon, Serializable, Comparable<EWeapon>

public enum EWeapon
extends Enum<EWeapon>
implements IWeapon

Enumeration defining all weapons

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Dec 23, 2011

Enum Constant Summary
BALLISTA_BIG
           
BALLISTA_SMALL
           
BOMBARD
           
BOW
           
CANNON
           
CROSSBOW
           
HAND_WEAPON
           
MUSKET
           
SWORD
           
TREBUCHET_BIG
           
TREBUCHET_SMALL
           
 
Field Summary
private  Locale locale
           
 
Method Summary
 String getLocalDisplayName()
          Retrieve the localized display name for id.
static EWeapon valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EWeapon[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ch.sahits.game.openpatrician.model.weapon.IWeapon
name
 

Enum Constant Detail

SWORD

public static final EWeapon SWORD

BOW

public static final EWeapon BOW

CROSSBOW

public static final EWeapon CROSSBOW

MUSKET

public static final EWeapon MUSKET

BALLISTA_SMALL

public static final EWeapon BALLISTA_SMALL

TREBUCHET_SMALL

public static final EWeapon TREBUCHET_SMALL

BALLISTA_BIG

public static final EWeapon BALLISTA_BIG

TREBUCHET_BIG

public static final EWeapon TREBUCHET_BIG

BOMBARD

public static final EWeapon BOMBARD

CANNON

public static final EWeapon CANNON

HAND_WEAPON

public static final EWeapon HAND_WEAPON
Field Detail

locale

private final Locale locale
Method Detail

values

public static EWeapon[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EWeapon c : EWeapon.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EWeapon valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getLocalDisplayName

public String getLocalDisplayName()
Retrieve the localized display name for id.

Specified by:
getLocalDisplayName in interface IWeapon
Parameters:
id -
Returns:


Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.