Enum Class DefaultStringLookup

java.lang.Object
java.lang.Enum<DefaultStringLookup>
org.apache.commons.text.lookup.DefaultStringLookup
All Implemented Interfaces:
Serializable, Comparable<DefaultStringLookup>, Constable

public enum DefaultStringLookup extends Enum<DefaultStringLookup>
An enumeration defining StringLookup objects available through StringLookupFactory.

This enum was adapted and expanded from Apache Commons Configuration 2.4.

Since:
1.7
See Also:
  • Enum Constant Details

  • Field Details

    • key

      private final String key
      The prefix under which the associated lookup object is registered.
    • lookup

      private final StringLookup lookup
      The associated lookup instance.
  • Constructor Details

    • DefaultStringLookup

      private DefaultStringLookup(String prefix, StringLookup lookup)
      Creates a new instance of DefaultStringLookup and sets the key and the associated lookup instance.
      Parameters:
      prefix - the prefix
      lookup - the StringLookup instance
  • Method Details

    • values

      public static DefaultStringLookup[] 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 DefaultStringLookup 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
    • getKey

      public String getKey()
      Returns the standard prefix for the lookup object of this kind.
      Returns:
      the prefix
    • getStringLookup

      public StringLookup getStringLookup()
      Returns the standard StringLookup instance of this kind.
      Returns:
      the associated StringLookup object