Class UrlStringLookup

java.lang.Object
org.apache.commons.text.lookup.AbstractStringLookup
org.apache.commons.text.lookup.UrlStringLookup
All Implemented Interfaces:
StringLookup

final class UrlStringLookup extends AbstractStringLookup
Looks up keys from an XML document.

Looks up the value for a given key in the format "Charset:URL".

For example: "UTF-8:com/domain/document.properties".

Since:
1.5
  • Field Details

    • INSTANCE

      static final UrlStringLookup INSTANCE
      Defines the singleton for this class.
  • Constructor Details

    • UrlStringLookup

      private UrlStringLookup()
      No need to build instances for now.
  • Method Details

    • lookup

      public String lookup(String key)
      Looks up the value for the key in the format "DocumentPath:XPath".

      For example: "com/domain/document.xml:/path/to/node".

      Parameters:
      key - the key to be looked up, may be null
      Returns:
      The value associated with the key.