Enum Class DefaultReplaceType

java.lang.Object
java.lang.Enum<DefaultReplaceType>
xyz.srnyx.annoyingapi.message.DefaultReplaceType
All Implemented Interfaces:
Serializable, Comparable<DefaultReplaceType>, Constable, ReplaceType

public enum DefaultReplaceType extends Enum<DefaultReplaceType> implements ReplaceType
  • Enum Constant Details

    • TIME

      public static final DefaultReplaceType TIME
      Input is used as the format for DurationFormatter.formatDuration(long, String)
    • NUMBER

      public static final DefaultReplaceType NUMBER
      Input is used as the format for StringUtility.formatNumber(Number, String)
    • BOOLEAN

      public static final DefaultReplaceType BOOLEAN
      Input is used to turn 'true' or 'false' into the specified value
  • Method Details

    • values

      public static DefaultReplaceType[] 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

      public static DefaultReplaceType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getDefaultInput

      @NotNull public @NotNull String getDefaultInput()
      Gets the default input of the type

      This is used if the user does not provide a custom input

      Specified by:
      getDefaultInput in interface ReplaceType
      Returns:
      the default input
    • getOutputOperator

      @NotNull public @NotNull BinaryOperator<String> getOutputOperator()
      Gets the BinaryOperator to use on the input and value
      Specified by:
      getOutputOperator in interface ReplaceType
      Returns:
      the BinaryOperator to use on the input and value