Package xyz.srnyx.annoyingapi.message
Enum Class DefaultReplaceType
- All Implemented Interfaces:
Serializable,Comparable<DefaultReplaceType>,Constable,ReplaceType
Default replace types for
AnnoyingMessage.replace(String, Object, ReplaceType)-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescription@NotNull StringGets the default input of the type@NotNull BinaryOperator<String> Gets theBinaryOperatorto use on the input and valuestatic DefaultReplaceTypeReturns the enum constant of this class with the specified name.static DefaultReplaceType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TIME
Input is used as the format forDurationFormatter.formatDuration(long, String) -
NUMBER
Input is used as the format forStringUtility.formatNumber(Number, String) -
BOOLEAN
Input is used to turn 'true' or 'false' into the specified value
-
-
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
-
getDefaultInput
Gets the default input of the typeThis is used if the user does not provide a custom input
- Specified by:
getDefaultInputin interfaceReplaceType- Returns:
- the default input
-
getOutputOperator
Gets theBinaryOperatorto use on the input and value- Specified by:
getOutputOperatorin interfaceReplaceType- Returns:
- the
BinaryOperatorto use on the input and value
-