public enum DefaultReplaceType extends java.lang.Enum<DefaultReplaceType> implements ReplaceType
AnnoyingMessage.replace(String, Object, ReplaceType)| Enum Constant and Description |
|---|
BOOLEAN
Input is used to turn 'true' or 'false' into the specified value
|
NUMBER
Input is used as the format for
StringUtility.formatNumber(Number, String) |
TIME
Input is used as the format for
DurationFormatter.formatDuration(long, String) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
getDefaultInput()
Gets the default input of the type
|
@NotNull java.util.function.BinaryOperator<java.lang.String> |
getOutputOperator()
Gets the
BinaryOperator to use on the input and value |
static DefaultReplaceType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DefaultReplaceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DefaultReplaceType TIME
DurationFormatter.formatDuration(long, String)public static final DefaultReplaceType NUMBER
StringUtility.formatNumber(Number, String)public static final DefaultReplaceType BOOLEAN
public static DefaultReplaceType[] values()
for (DefaultReplaceType c : DefaultReplaceType.values()) System.out.println(c);
public static DefaultReplaceType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null@NotNull public @NotNull java.lang.String getDefaultInput()
This is used if the user does not provide a custom input
getDefaultInput in interface ReplaceType@NotNull public @NotNull java.util.function.BinaryOperator<java.lang.String> getOutputOperator()
BinaryOperator to use on the input and valuegetOutputOperator in interface ReplaceTypeBinaryOperator to use on the input and value