public enum MowerCommands extends Enum<MowerCommands>
Modifier and Type | Method and Description |
---|---|
static MowerCommands |
fetchCommand(char abbreviation)
Find a commands thanks to the abbreviation.
|
String |
getCommandName() |
static MowerCommands |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MowerCommands[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MowerCommands LEFT
public static final MowerCommands RIGHT
public static final MowerCommands FORWARD
public static final MowerCommands BACKWARD
public static MowerCommands[] values()
for (MowerCommands c : MowerCommands.values()) System.out.println(c);
public static MowerCommands 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 nullpublic static MowerCommands fetchCommand(char abbreviation)
abbreviation
- the abbreviation which represents the commandspublic String getCommandName()
Copyright © 2016. All Rights Reserved.