Enum Class MessageTemplates.TwoArgTemplate

java.lang.Object
java.lang.Enum<MessageTemplates.TwoArgTemplate>
io.github.chrimle.exceptionfactory.MessageTemplates.TwoArgTemplate
All Implemented Interfaces:
Serializable, Comparable<MessageTemplates.TwoArgTemplate>, Constable
Enclosing class:
MessageTemplates

public static enum MessageTemplates.TwoArgTemplate extends Enum<MessageTemplates.TwoArgTemplate>
Template requiring TWO template specifiers to format a message.
Since:
0.1.0
Author:
Chrimle
  • Enum Constant Details

  • Method Details

    • values

      public static MessageTemplates.TwoArgTemplate[] 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 MessageTemplates.TwoArgTemplate 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
    • getTemplate

      @Contract(pure=true) public String getTemplate()
      Returns the template of this constant.
      Returns:
      the template.
      Since:
      0.1.0
    • format

      @Contract(pure=true) @NotNull public @NotNull String format(String argOne, String argTwo)
      Creates a formatted String from the template and arg.
      Parameters:
      argOne - to be used as the first template specifier.
      argTwo - to be used as the second template specifier.
      Returns:
      the formatted String.
      Since:
      0.1.0