public enum ShipCategory extends java.lang.Enum<ShipCategory>
Enum Constant and Description |
---|
AIRCRAFT_CARRIER
catégorie de bateaux "Porte-avion"
|
BATTLESHIP
catégorie de bateaux "Cuirassé"
|
CRUISER
catégorie de bateaux "Croiseur"
|
DESTROYER
catégorie de bateaux "Torpilleur"
|
SUBMARINE
catégorie de bateaux "Sous-marin"
|
Modifier and Type | Method and Description |
---|---|
int |
getSize() |
static ShipCategory |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ShipCategory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ShipCategory AIRCRAFT_CARRIER
public static final ShipCategory BATTLESHIP
public static final ShipCategory CRUISER
public static final ShipCategory DESTROYER
public static final ShipCategory SUBMARINE
public int getSize()
public static ShipCategory valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static ShipCategory[] values()
for (ShipCategory c : ShipCategory.values()) System.out.println(c);