Package org.apache.commons.text.lookup
package org.apache.commons.text.lookup
Provides algorithms for looking up strings for use with a StringSubstitutor. The main class in this package is StringLookupFactory.
Use StringLookupFactory to create instances of string
lookups or access singleton string lookups. The main interface is StringLookup which is implemented here in package private classes.
Like BiFunction is a variant of Function,
this BiStringLookup is a variant of
StringLookup.
The initial implementation was adapted from Apache Commons Log4j 2.11.0.
- Since:
- 1.3
-
ClassDescriptionAbstracts string lookup that guards Path lookups with a fence.A default lookup for others to extend in this package.A function-based lookup where the request for a lookup is answered by applying that function with a key.Lookups a String key for a String value.Looks up the value of a fully-qualified static final value.Formats the current date with the format given in the key in a format compatible with
SimpleDateFormat.An enumeration definingStringLookupobjects available throughStringLookupFactory.Looks up keys related to DNS entries like host name, canonical host name, host address.Looks up file contents.A function-based lookup where the request for a lookup is answered by applying that function with a key.Shorthands creatingIllegalArgumentExceptioninstances using formatted strings.Constants for referring toInetAddressAPIs.Looks up keys related to an.invalid reference
InetAddresseProxies otherStringLookups using a keys within ${} markers using the format "${StringLookup:Key}".Looks up keys related to Java: Java version, JRE version, VM version, and so on.A Path fence guards against using paths outside of a "fence" of made of root paths.BuildsPathFenceinstances.Looks up keys from a properties file.Looks up keys from resource bundles.Executes the script with the given engine name.Lookups a String key for a String value.Create instances of string lookups or access singleton string lookups implemented in this package.Builds instance ofStringLookupFactory.Internal class used to construct the defaultStringLookupmap used byStringLookupFactory.addDefaultStringLookups(Map).Decodes URL Strings using the UTF-8 encoding.Encodes URL Strings using the UTF-8 encoding.Looks up keys from an XML document.Decodes strings according to the XML 1.0 specification.Encodes strings according to the XML 1.0 specification.Looks up values in an XML document in the format"DocumentPath:XPath".