Top Description Interfaces Classes Enums
[default module]

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

Interface Summary

Modifier and TypeInterface and Description
public interface
BiStringLookup<
The second argument type.
U
>

Lookups a String key for a String value.

public interface
StringLookup

Lookups a String key for a String value.

Class Summary

Modifier and TypeClass and Description
pack-priv abstract class
AbstractPathFencedLookup

Abstracts string lookup that guards Path lookups with a fence.

pack-priv abstract class
AbstractStringLookup

A default lookup for others to extend in this package.

pack-priv class
BiFunctionStringLookup<
A function's second input type
P
,
A function's return type
R
>

A function-based lookup where the request for a lookup is answered by applying that function with a key.

pack-priv class
ConstantStringLookup

Looks up the value of a fully-qualified static final value.

pack-priv class
DateStringLookup

Formats the current date with the format given in the key in a format compatible with java.text.SimpleDateFormat.

pack-priv class
DnsStringLookup

Looks up keys related to DNS entries like host name, canonical host name, host address.

pack-priv class
FileStringLookup

Looks up file contents.

pack-priv class
FunctionStringLookup<
A function's input type
V
>

A function-based lookup where the request for a lookup is answered by applying that function with a key.

pack-priv class
IllegalArgumentExceptions

Shorthands creating IllegalArgumentException instances using formatted strings.

pack-priv class
InetAddressKeys

Constants for referring to InetAddress APIs.

pack-priv class
InetAddressStringLookup

Looks up keys related to an InetAddresse.

pack-priv class
InterpolatorStringLookup

Proxies other StringLookups using a keys within ${} markers using the format "${StringLookup:Key}".

pack-priv class
JavaPlatformStringLookup

Looks up keys related to Java: Java version, JRE version, VM version, and so on.

pack-priv class
PathFence

A Path fence guards against using paths outside of a "fence" of made of root paths.

pack-priv class
PropertiesStringLookup

Looks up keys from a properties file.

pack-priv class
ResourceBundleStringLookup

Looks up keys from resource bundles.

pack-priv class
ScriptStringLookup

Executes the script with the given engine name.

public class
StringLookupFactory

Create instances of string lookups or access singleton string lookups implemented in this package.

pack-priv class
UrlDecoderStringLookup

Decodes URL Strings using the UTF-8 encoding.

pack-priv class
UrlEncoderStringLookup

Encodes URL Strings using the UTF-8 encoding.

pack-priv class
UrlStringLookup

Looks up keys from an XML document.

pack-priv class
XmlDecoderStringLookup

Decodes strings according to the XML 1.0 specification.

pack-priv class
XmlEncoderStringLookup

Encodes strings according to the XML 1.0 specification.

pack-priv class
XmlStringLookup

Looks up values in an XML document in the format "DocumentPath:XPath".

Enum Summary

Modifier and TypeEnum and Description
public enum
DefaultStringLookup

An enumeration defining StringLookup objects available through StringLookupFactory.