Class InetAddressStringLookup
java.lang.Object
org.apache.commons.text.lookup.AbstractStringLookup
org.apache.commons.text.lookup.InetAddressStringLookup
- All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>, StringLookup
Looks up keys related to an
.
invalid reference
InetAddresse
- local host: host name, canonical host name, host address.
The lookup keys are:
- name: for the local host name, for example
EXAMPLE. - canonical-name: for the local canonical host name, for example
EXAMPLE.apache.org. - address: for the local host address, for example
192.168.56.1.
Public access is through StringLookupFactory.
- Since:
- 1.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.commons.lang3.function.FailableSupplier<InetAddress, UnknownHostException> Supplies theInetAddress.(package private) static final InetAddressStringLookupDefines the LOCAL_HOST constant.(package private) static final InetAddressStringLookupDefines the LOCAL_HOST constant.Fields inherited from class AbstractStringLookup
SPLIT_CH, SPLIT_STR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateInetAddressStringLookup(org.apache.commons.lang3.function.FailableSupplier<InetAddress, UnknownHostException> inetAddressSupplier) No need to build instances for now. -
Method Summary
Methods inherited from class AbstractStringLookup
substringAfter, substringAfter, substringAfterLast, toLookupKey, toLookupKeyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StringLookup
apply
-
Field Details
-
LOCAL_HOST
Defines the LOCAL_HOST constant. -
LOOPACK_ADDRESS
Defines the LOCAL_HOST constant. -
inetAddressSupplier
private final org.apache.commons.lang3.function.FailableSupplier<InetAddress, UnknownHostException> inetAddressSupplierSupplies theInetAddress.
-
-
Constructor Details
-
InetAddressStringLookup
private InetAddressStringLookup(org.apache.commons.lang3.function.FailableSupplier<InetAddress, UnknownHostException> inetAddressSupplier) No need to build instances for now.
-
-
Method Details
-
getInetAddress
- Throws:
UnknownHostException
-
lookup
-