DefaultStringLookup (Apache Commons Text 1.13.0 API)
Description: declaration: package: org.apache.commons.text.lookup, enum: DefaultStringLookup

Package org.apache.commons.text.lookup

# Enum DefaultStringLookup

java.lang.Object
java.lang.Enum<DefaultStringLookup>
org.apache.commons.text.lookup.DefaultStringLookup

All Implemented Interfaces:
  `Serializable`, `Comparable<DefaultStringLookup>`

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.

NOTE: Starting in version 1.10.0, not all lookups defined in this class are included by default in the `StringLookupFactory.addDefaultStringLookups` method. See the `StringLookupFactory` class documentation for details.

Since:
  1.7
See Also:
  - `StringLookupFactory`
  - `StringLookup`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BASE64_DECODER`
  The lookup for Base64 decoding using the key `"base64Decoder"`.
  `BASE64_ENCODER`
  The lookup for Base64 encoding using the key `"base64Encoder"`.
  `CONST`
  The lookup for Java static class member constants using the key `"const"`.
  `DATE`
  The lookup for formatting the current date using the key `"date"`.
  `DNS`
  The lookup for DNS using the key `"dns"`.
  `ENVIRONMENT`
  The lookup for environment properties using the key `"env"`.
  `FILE`
  The lookup for files using the key `"file"`.
  `JAVA`
  The lookup for Java platform information using the key `"java"`.
  `LOCAL_HOST`
  The lookup for local host information using the key `"localhost"`.
  `LOOPBACK_ADDRESS`
  The lookup for local host information using the key `"loopbackAddress"`.
  `PROPERTIES`
  The lookup for properties using the key `"properties"`.
  `RESOURCE_BUNDLE`
  The lookup for resource bundles using the key `"resourceBundle"`.
  `SCRIPT`
  The lookup for scripts using the key `"script"`.
  `SYSTEM_PROPERTIES`
  The lookup for system properties using the key `"sys"`.
  `URL`
  The lookup for URLs using the key `"url"`.
  `URL_DECODER`
  The lookup for URL decoding using the key `"urlDecoder"`.
  `URL_ENCODER`
  The lookup for URL encoding using the key `"urlEncoder"`.
  `XML`
  The lookup for XML decoding using the key `"xml"`.
  `XML_DECODER`
  The lookup for XML decoding using the key `"xmlDecoder"`.
  `XML_ENCODER`
  The lookup for XML encoding using the key `"xmlEncoder"`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getKey()`
  Gets the standard prefix for the lookup object of this kind.
  `StringLookup`
  `getStringLookup()`
  Gets the standard `StringLookup` instance of this kind.
  `static DefaultStringLookup`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static DefaultStringLookup[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### BASE64_DECODER

    public static final DefaultStringLookup BASE64_DECODER
    The lookup for Base64 decoding using the key `"base64Decoder"`.
    See Also:
      - `StringLookupFactory.KEY_BASE64_DECODER`
      - `StringLookupFactory.base64DecoderStringLookup()`

  - ### BASE64_ENCODER

    public static final DefaultStringLookup BASE64_ENCODER
    The lookup for Base64 encoding using the key `"base64Encoder"`.
    See Also:
      - `StringLookupFactory.KEY_BASE64_ENCODER`
      - `StringLookupFactory.base64EncoderStringLookup()`

  - ### CONST

    public static final DefaultStringLookup CONST
    The lookup for Java static class member constants using the key `"const"`.
    See Also:
      - `StringLookupFactory.KEY_CONST`
      - `StringLookupFactory.constantStringLookup()`

  - ### DATE

    public static final DefaultStringLookup DATE
    The lookup for formatting the current date using the key `"date"`.
    See Also:
      - `StringLookupFactory.KEY_DATE`
      - `StringLookupFactory.dateStringLookup()`

  - ### DNS

    public static final DefaultStringLookup DNS
    The lookup for DNS using the key `"dns"`.
    Since:
      1.8
    See Also:
      - `StringLookupFactory.KEY_DNS`
      - `StringLookupFactory.dnsStringLookup()`

  - ### ENVIRONMENT

    public static final DefaultStringLookup ENVIRONMENT
    The lookup for environment properties using the key `"env"`.
    See Also:
      - `StringLookupFactory.KEY_ENV`
      - `StringLookupFactory.environmentVariableStringLookup()`

  - ### FILE

    public static final DefaultStringLookup FILE
    The lookup for files using the key `"file"`.
    See Also:
      - `StringLookupFactory.KEY_FILE`
      - `StringLookupFactory.fileStringLookup()`

  - ### JAVA

    public static final DefaultStringLookup JAVA
    The lookup for Java platform information using the key `"java"`.
    See Also:
      - `StringLookupFactory.KEY_JAVA`
      - `StringLookupFactory.javaPlatformStringLookup()`

  - ### LOCAL_HOST

    public static final DefaultStringLookup LOCAL_HOST
    The lookup for local host information using the key `"localhost"`.
    See Also:
      - `StringLookupFactory.KEY_LOCALHOST`
      - `StringLookupFactory.localHostStringLookup()`

  - ### LOOPBACK_ADDRESS

    public static final DefaultStringLookup LOOPBACK_ADDRESS
    The lookup for local host information using the key `"loopbackAddress"`.
    See Also:
      - `StringLookupFactory.KEY_LOOPBACK_ADDRESS`
      - `StringLookupFactory.loopbackAddressStringLookup()`

  - ### PROPERTIES

    public static final DefaultStringLookup PROPERTIES
    The lookup for properties using the key `"properties"`.
    See Also:
      - `StringLookupFactory.KEY_PROPERTIES`
      - `StringLookupFactory.propertiesStringLookup()`

  - ### RESOURCE_BUNDLE

    public static final DefaultStringLookup RESOURCE_BUNDLE
    The lookup for resource bundles using the key `"resourceBundle"`.
    See Also:
      - `StringLookupFactory.KEY_RESOURCE_BUNDLE`
      - `StringLookupFactory.resourceBundleStringLookup()`

  - ### SCRIPT

    public static final DefaultStringLookup SCRIPT
    The lookup for scripts using the key `"script"`.
    See Also:
      - `StringLookupFactory.KEY_SCRIPT`
      - `StringLookupFactory.scriptStringLookup()`

  - ### SYSTEM_PROPERTIES

    public static final DefaultStringLookup SYSTEM_PROPERTIES
    The lookup for system properties using the key `"sys"`.
    See Also:
      - `StringLookupFactory.KEY_SYS`
      - `StringLookupFactory.systemPropertyStringLookup()`

  - ### URL

    public static final DefaultStringLookup URL
    The lookup for URLs using the key `"url"`.
    See Also:
      - `StringLookupFactory.KEY_URL`
      - `StringLookupFactory.urlStringLookup()`

  - ### URL_DECODER

    public static final DefaultStringLookup URL_DECODER
    The lookup for URL decoding using the key `"urlDecoder"`.
    See Also:
      - `StringLookupFactory.KEY_URL_DECODER`
      - `StringLookupFactory.urlDecoderStringLookup()`

  - ### URL_ENCODER

    public static final DefaultStringLookup URL_ENCODER
    The lookup for URL encoding using the key `"urlEncoder"`.
    See Also:
      - `StringLookupFactory.KEY_URL_ENCODER`
      - `StringLookupFactory.urlEncoderStringLookup()`

  - ### XML

    public static final DefaultStringLookup XML
    The lookup for XML decoding using the key `"xml"`.
    See Also:
      - `StringLookupFactory.KEY_XML`
      - `StringLookupFactory.xmlStringLookup()`

  - ### XML_DECODER

    public static final DefaultStringLookup XML_DECODER
    The lookup for XML decoding using the key `"xmlDecoder"`.
    Since:
      1.11.0
    See Also:
      - `StringLookupFactory.KEY_XML_DECODER`
      - `StringLookupFactory.xmlDecoderStringLookup()`

  - ### XML_ENCODER

    public static final DefaultStringLookup XML_ENCODER
    The lookup for XML encoding using the key `"xmlEncoder"`.
    Since:
      1.11.0
    See Also:
      - `StringLookupFactory.KEY_XML_ENCODER`
      - `StringLookupFactory.xmlEncoderStringLookup()`

- ## Method Details

  - ### values

    public static DefaultStringLookup[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static DefaultStringLookup valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getKey

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

  - ### getStringLookup

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