public enum Compass extends Enum<Compass>
| Enum Constant and Description |
|---|
CENTER |
EAST |
NORTH |
NORTH_EAST |
NORTH_WEST |
SOUTH |
SOUTH_EAST |
SOUTH_WEST |
WEST |
| Modifier and Type | Method and Description |
|---|---|
static Optional<Compass> |
of(String value) |
static Compass |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Compass[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Compass NORTH
public static final Compass NORTH_EAST
public static final Compass EAST
public static final Compass SOUTH_EAST
public static final Compass SOUTH
public static final Compass SOUTH_WEST
public static final Compass WEST
public static final Compass NORTH_WEST
public static final Compass CENTER
public static Compass[] values()
for (Compass c : Compass.values()) System.out.println(c);
public static Compass valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2015–2017. All rights reserved.