Package it.meucci.commands
Enum Class Errors
- All Implemented Interfaces:
Serializable
,Comparable<Errors>
,Constable
There errors are the ones the program issue when the user type an error wrongly.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe error is not recognized amoungCommandType
The error is recognized but the right arguments were not provided -
Method Summary
Modifier and TypeMethodDescriptionstatic String
As per Messages, errors also needs to be displayed correctly.static Errors
Returns the enum constant of this class with the specified name.static Errors[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMMAND_NOT_RECOGNIZED
The error is not recognized amoungCommandType
-
WRONG_ARGS
The error is recognized but the right arguments were not provided
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
humanizeError
As per Messages, errors also needs to be displayed correctly. For the same reasons as messages, a toString implementation was not used because we wanted to reserve it for debug purpuses.- Parameters:
e
- The error to be displayed- Returns:
- A ready to be displayed string
-