Top Description Fields Constructors Methods
org.apache.commons.text.lookup

pack-priv final Class InetAddressStringLookup

extends AbstractStringLookup
Class Inheritance
Imports
java.net.InetAddress, .UnknownHostException, java.util.Objects, org.apache.commons.lang3.function.FailableSupplier

Looks up keys related to an InetAddresse.

The lookup keys are:

Public access is through StringLookupFactory.

Since
1.3
See Also
StringLookupFactory

Field Summary

Modifier and TypeField and Description
private final FailableSupplier<InetAddress, UnknownHostException>
pack-priv static final InetAddressStringLookup
LOCAL_HOST

Defines the LOCAL_HOST constant.

pack-priv static final InetAddressStringLookup
LOOPACK_ADDRESS

Defines the LOCAL_HOST constant.

Inherited from org.apache.commons.text.lookup.AbstractStringLookup:
SPLIT_CHSPLIT_STR

Constructor Summary

AccessConstructor and Description
private
InetAddressStringLookup(final FailableSupplier<InetAddress, UnknownHostException> inetAddressSupplier)

No need to build instances for now.

Method Summary

Modifier and TypeMethod and Description
private InetAddress
public String

Returns:

The value of the environment variable.
lookup
(final String
the key to be looked up, may be null.
key
)

Implements org.apache.commons.text.lookup.StringLookup.lookup.

Looks up the value of a local host key.

Inherited from org.apache.commons.text.lookup.AbstractStringLookup:
substringAftersubstringAftersubstringAfterLasttoLookupKeytoLookupKey

Field Detail

inetAddressSupplierback to summary
private final FailableSupplier<InetAddress, UnknownHostException> inetAddressSupplier

Supplies the InetAddress.

LOCAL_HOSTback to summary
pack-priv static final InetAddressStringLookup LOCAL_HOST

Defines the LOCAL_HOST constant.

LOOPACK_ADDRESSback to summary
pack-priv static final InetAddressStringLookup LOOPACK_ADDRESS

Defines the LOCAL_HOST constant.

Constructor Detail

InetAddressStringLookupback to summary
private InetAddressStringLookup(final FailableSupplier<InetAddress, UnknownHostException> inetAddressSupplier)

No need to build instances for now.

Method Detail

getInetAddressback to summary
private InetAddress getInetAddress() throws UnknownHostException
lookupback to summary
public String lookup(final String key)

Implements org.apache.commons.text.lookup.StringLookup.lookup.

Looks up the value of a local host key.

Parameters
key:String

the key to be looked up, may be null.

Returns:String

The value of the environment variable.

Annotations
@Override