Enum Class NameFormatters

java.lang.Object
java.lang.Enum<NameFormatters>
de.exlll.configlib.NameFormatters
All Implemented Interfaces:
NameFormatter, Serializable, Comparable<NameFormatters>, Constable, Function<String,String>

public enum NameFormatters extends Enum<NameFormatters> implements NameFormatter
This class contains instances of ready-to-use NameFormatters.
  • Enum Constant Details

    • IDENTITY

      public static final NameFormatters IDENTITY
      A NameFormatter that simply returns the given name.
    • LOWER_UNDERSCORE

      public static final NameFormatters LOWER_UNDERSCORE
      A NameFormatter that transforms camelCase to lower_underscore.

      For example, myPrivateField becomes my_private_field.

    • UPPER_UNDERSCORE

      public static final NameFormatters UPPER_UNDERSCORE
      A NameFormatter that transforms camelCase to UPPER_UNDERSCORE.

      For example, myPrivateField becomes MY_PRIVATE_FIELD.

    • LOWER_KEBAB_CASE

      public static final NameFormatters LOWER_KEBAB_CASE
      A NameFormatter that transforms camelCase to lower-kebab-case.

      For example, myPrivateField becomes my-private-field.

    • UPPER_KEBAB_CASE

      public static final NameFormatters UPPER_KEBAB_CASE
      A NameFormatter that transforms camelCase to UPPER-KEBAB-CASE.

      For example, myPrivateField becomes MY-PRIVATE-FIELD.

  • Method Details

    • values

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