Package net.anotheria.anosite.wizard
Enum WizardCommand
- java.lang.Object
-
- java.lang.Enum<WizardCommand>
-
- net.anotheria.anosite.wizard.WizardCommand
-
- All Implemented Interfaces:
Serializable,Comparable<WizardCommand>
public enum WizardCommand extends Enum<WizardCommand>
Wizard step navigation button constants.- Author:
- h3ll
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELCancel.FINISHFinish.NAVIGATE_TONAVIGATE_TO step.NEXTNext.PREVIOUSPrevious.
-
Field Summary
Fields Modifier and Type Field Description static WizardCommandDEFAULT_COMMANDWizardCommand default.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WizardCommandgetCommandByValue(String command)ReturnWizardCommandwith selected value.static WizardCommandgetCommandByValue(Map<String,String[]> parameters)ReturnsWizardCommand.StringgetCommandTitle()StringtoString()static WizardCommandvalueOf(String name)Returns the enum constant of this type with the specified name.static WizardCommand[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CANCEL
public static final WizardCommand CANCEL
Cancel.
-
FINISH
public static final WizardCommand FINISH
Finish.
-
PREVIOUS
public static final WizardCommand PREVIOUS
Previous.
-
NEXT
public static final WizardCommand NEXT
Next.
-
NAVIGATE_TO
public static final WizardCommand NAVIGATE_TO
NAVIGATE_TO step.
-
-
Field Detail
-
DEFAULT_COMMAND
public static final WizardCommand DEFAULT_COMMAND
WizardCommand default.
-
-
Method Detail
-
values
public static WizardCommand[] 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 (WizardCommand c : WizardCommand.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static WizardCommand 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 nameNullPointerException- if the argument is null
-
getCommandTitle
public String getCommandTitle()
-
toString
public String toString()
- Overrides:
toStringin classEnum<WizardCommand>
-
getCommandByValue
public static WizardCommand getCommandByValue(Map<String,String[]> parameters)
ReturnsWizardCommand.- Parameters:
parameters-Mapactually request parameter map- Returns:
WizardCommand, if not found in map NEXT will be returned
-
getCommandByValue
public static WizardCommand getCommandByValue(String command)
ReturnWizardCommandwith selected value. (Comparing using ignore-case).- Parameters:
command- incoming string- Returns:
WizardCommandwith selected command value, or DEFAULT_COMMAND if nothing found.
-
-