Package io.github.skenvy
Enum Collatz.SaneParameterErrMsg
- java.lang.Object
-
- java.lang.Enum<Collatz.SaneParameterErrMsg>
-
- io.github.skenvy.Collatz.SaneParameterErrMsg
-
- All Implemented Interfaces:
Serializable
,Comparable<Collatz.SaneParameterErrMsg>
- Enclosing class:
- Collatz
protected static enum Collatz.SaneParameterErrMsg extends Enum<Collatz.SaneParameterErrMsg>
Error message constants, to be used as input to the FailedSaneParameterCheck.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SANE_PARAMS_A
Message to print in the FailedSaneParameterCheck ifa
, the multiplicand, is zero.SANE_PARAMS_P
Message to print in the FailedSaneParameterCheck ifP
, the modulus, is zero.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getErrorMessage()
Retrieve the error message associated with the enum.static Collatz.SaneParameterErrMsg
valueOf(String name)
Returns the enum constant of this type with the specified name.static Collatz.SaneParameterErrMsg[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SANE_PARAMS_P
public static final Collatz.SaneParameterErrMsg SANE_PARAMS_P
Message to print in the FailedSaneParameterCheck ifP
, the modulus, is zero.
-
SANE_PARAMS_A
public static final Collatz.SaneParameterErrMsg SANE_PARAMS_A
Message to print in the FailedSaneParameterCheck ifa
, the multiplicand, is zero.
-
-
Method Detail
-
values
public static Collatz.SaneParameterErrMsg[] 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 (Collatz.SaneParameterErrMsg c : Collatz.SaneParameterErrMsg.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Collatz.SaneParameterErrMsg 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
-
getErrorMessage
protected String getErrorMessage()
Retrieve the error message associated with the enum.- Returns:
- The message to pass to the thrown error.
-
-