Interface IPAddressProvider
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
IPAddressProvider.AdjustedAddressCreator, IPAddressProvider.AllCreator, IPAddressProvider.CachedAddressProvider, IPAddressProvider.LoopbackCreator, IPAddressProvider.MaskCreator, IPAddressProvider.NullProvider, IPAddressProvider.VersionedAddressCreator, ParsedIPAddress
Provides an address corresponding to a parsed string.
- Author:
- sfoley
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic enumstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IPAddressProvider.NullProviderstatic final IPAddressProvider.NullProviderstatic final IPAddressProvider.NullProvider -
Method Summary
Modifier and TypeMethodDescriptiondefault Booleancontains(IPAddressProvider other) An optimized contains that does not need to create address objects to return an answer.default BooleanAn optimized contains that does not need to fully parse the other address to return an answer.default IPAddressDivisionSeriesdefault IPAddressStringParametersIf the address was created by parsing, this provides the parameters used when creating the address.getProviderAddress(IPAddress.IPVersion version) static IPAddressProvidergetProviderFor(IPAddress address, IPAddress hostAddress) Wraps an IPAddress for IPAddressString in the cases where no parsing is provided, the address exists alreadydefault IPAddress.IPVersiondefault IPAddressdefault Integerdefault IPAddressSeqRangegetType()default booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault booleandefault BooleanparsedEquals(IPAddressProvider other) An optimized equality comparison that does not need to create addresses to return an answer.default BooleanprefixContains(IPAddressProvider other) An optimized prefix comparison that does not need to create addresses to return an answer.default BooleanprefixContains(String other) An optimized prefix comparison that does not need to create addresses to return an answer.default BooleanprefixEquals(IPAddressProvider other) An optimized prefix comparison that does not need to create addresses to return an answer.default BooleanprefixEquals(String other) An optimized prefix comparison that does not need to fully parse the other address to return an answer.default intproviderCompare(IPAddressProvider other) default booleanproviderEquals(IPAddressProvider other) When a value provider produces no value, equality and comparison are based on the enum IPType, which can by null.default int
-
Field Details
-
INVALID_PROVIDER
-
NO_TYPE_PROVIDER
-
EMPTY_PROVIDER
-
-
Method Details
-
getType
IPAddressProvider.IPType getType() -
getProviderHostAddress
- Throws:
IncompatibleAddressException
-
getProviderAddress
- Throws:
IncompatibleAddressException
-
getProviderAddress
- Throws:
IncompatibleAddressException
-
isSequential
default boolean isSequential() -
getProviderSeqRange
-
getProviderMask
-
getDivisionGrouping
- Throws:
IncompatibleAddressException
-
providerCompare
- Throws:
IncompatibleAddressException
-
providerEquals
When a value provider produces no value, equality and comparison are based on the enum IPType, which can by null.- Parameters:
o-- Returns:
- Throws:
IncompatibleAddressException
-
providerHashCode
- Throws:
IncompatibleAddressException
-
getProviderIPVersion
-
isProvidingIPAddress
default boolean isProvidingIPAddress() -
isProvidingIPv4
default boolean isProvidingIPv4() -
isProvidingIPv6
default boolean isProvidingIPv6() -
isProvidingPrefixOnly
default boolean isProvidingPrefixOnly() -
isProvidingAllAddresses
default boolean isProvidingAllAddresses() -
isProvidingEmpty
default boolean isProvidingEmpty() -
isProvidingMixedIPv6
default boolean isProvidingMixedIPv6() -
isProvidingBase85IPv6
default boolean isProvidingBase85IPv6() -
getProviderNetworkPrefixLength
-
isInvalid
default boolean isInvalid() -
isUninitialized
default boolean isUninitialized() -
contains
An optimized contains that does not need to create address objects to return an answer. Unconventional addresses may require that the address objects are created, in such cases null is returned. Addresses constructed from canonical or normalized representations with no wildcards will not return null.- Parameters:
other-- Returns:
-
contains
An optimized contains that does not need to fully parse the other address to return an answer. Unconventional addresses may require full parsing, in such cases null is returned. Addresses constructed from canonical or normalized representations with no wildcards will not return null.- Parameters:
other-- Returns:
-
prefixEquals
An optimized prefix comparison that does not need to fully parse the other address to return an answer. Unconventional addresses may require full parsing, in such cases null is returned. Addresses constructed from canonical or normalized representations with no wildcards will not return null.- Parameters:
other-- Returns:
-
prefixEquals
An optimized prefix comparison that does not need to create addresses to return an answer. Unconventional addresses may require the address objects, in such cases null is returned.- Parameters:
other-- Returns:
-
prefixContains
-
prefixContains
An optimized prefix comparison that does not need to create addresses to return an answer. Unconventional addresses may require the address objects, in such cases null is returned.- Parameters:
other-- Returns:
-
parsedEquals
An optimized equality comparison that does not need to create addresses to return an answer. Unconventional addresses may require the address objects, in such cases null is returned.- Parameters:
other-- Returns:
-
hasPrefixSeparator
default boolean hasPrefixSeparator() -
getParameters
If the address was created by parsing, this provides the parameters used when creating the address.- Returns:
- the parameters used to create the address, or null if no such parameters were used.
-
getProviderFor
Wraps an IPAddress for IPAddressString in the cases where no parsing is provided, the address exists already- Parameters:
value-- Returns:
-