Module inet.ipaddr

Interface IPAddressProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
IPAddressProvider.AdjustedAddressCreator, IPAddressProvider.AllCreator, IPAddressProvider.CachedAddressCreator, IPAddressProvider.CachedAddressProvider, IPAddressProvider.LoopbackCreator, IPAddressProvider.MaskCreator, IPAddressProvider.NullProvider, IPAddressProvider.VersionedAddressCreator, ParsedIPAddress

public interface IPAddressProvider extends Serializable
Provides an address corresponding to a parsed string.
Author:
sfoley
  • Field Details

  • Method Details

    • getType

    • getProviderHostAddress

      IPAddress getProviderHostAddress() throws IncompatibleAddressException
      Throws:
      IncompatibleAddressException
    • getProviderAddress

      IPAddress getProviderAddress() throws IncompatibleAddressException
      Throws:
      IncompatibleAddressException
    • getProviderAddress

      IPAddress getProviderAddress(IPAddress.IPVersion version) throws IncompatibleAddressException
      Throws:
      IncompatibleAddressException
    • isSequential

      default boolean isSequential()
    • getProviderSeqRange

      default IPAddressSeqRange getProviderSeqRange()
    • getProviderMask

      default IPAddress getProviderMask()
    • getDivisionGrouping

      default IPAddressDivisionSeries getDivisionGrouping() throws IncompatibleAddressException
      Throws:
      IncompatibleAddressException
    • providerCompare

      default int providerCompare(IPAddressProvider other) throws IncompatibleAddressException
      Throws:
      IncompatibleAddressException
    • providerEquals

      default boolean providerEquals(IPAddressProvider other) throws IncompatibleAddressException
      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

      default int providerHashCode() throws IncompatibleAddressException
      Throws:
      IncompatibleAddressException
    • getProviderIPVersion

      default IPAddress.IPVersion 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

      default Integer getProviderNetworkPrefixLength()
    • isInvalid

      default boolean isInvalid()
    • isUninitialized

      default boolean isUninitialized()
    • contains

      default Boolean contains(IPAddressProvider other)
      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

      default Boolean contains(String other)
      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

      default Boolean prefixEquals(String other)
      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

      default Boolean prefixEquals(IPAddressProvider other)
      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

      default Boolean prefixContains(String other)
      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

      default Boolean prefixContains(IPAddressProvider other)
      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

      default Boolean parsedEquals(IPAddressProvider other)
      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

      default IPAddressStringParameters 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

      static IPAddressProvider getProviderFor(IPAddress address, IPAddress hostAddress)
      Wraps an IPAddress for IPAddressString in the cases where no parsing is provided, the address exists already
      Parameters:
      value -
      Returns: