Module inet.ipaddr

Class ParsedIPAddress

    • Method Detail

      • getParameters

        public IPAddressStringParameters getParameters()
        Description copied from interface: IPAddressProvider
        If the address was created by parsing, this provides the parameters used when creating the address.
        Specified by:
        getParameters in interface IPAddressProvider
        Returns:
        the parameters used to create the address, or null if no such parameters were used.
      • maskRange

        @Deprecated
        public static ParsedIPAddress.ExtendedMasker maskRange​(long value,
                                                               long extendedValue,
                                                               long upperValue,
                                                               long extendedUpperValue,
                                                               long maskValue,
                                                               long extendedMaskValue,
                                                               long maxValue,
                                                               long extendedMaxValue)
        Deprecated.
        use maskExtendedRange
        Parameters:
        value -
        extendedValue -
        upperValue -
        extendedUpperValue -
        maskValue -
        extendedMaskValue -
        maxValue -
        extendedMaxValue -
        Returns:
      • maskExtendedRange

        public static ParsedIPAddress.ExtendedMasker maskExtendedRange​(long value,
                                                                       long extendedValue,
                                                                       long upperValue,
                                                                       long extendedUpperValue,
                                                                       long maskValue,
                                                                       long extendedMaskValue,
                                                                       long maxValue,
                                                                       long extendedMaxValue)
      • maskRange

        public static ParsedIPAddress.Masker maskRange​(long value,
                                                       long upperValue,
                                                       long maskValue)
        Parameters:
        value -
        upperValue -
        maskValue -
        Returns:
        an instance what will produce the result of masking the values -1 if not compatible and x where x >= 0 if compatible. If x is 0, then the resulting masked range is (value & maskValue) to (upperValue & maskValue). If x > 0, then the resulting masked range is (value & maskValue & lowerMask) to ((upperValue & maskValue) | upperMask) where upperMask is ~0 >>> x and lowerMask = ~upperMask.
      • maskRange

        public static ParsedIPAddress.Masker maskRange​(long value,
                                                       long upperValue,
                                                       long maskValue,
                                                       long maxValue)
      • bitwiseOrRange

        public static ParsedIPAddress.BitwiseOrer bitwiseOrRange​(long value,
                                                                 long upperValue,
                                                                 long maskValue,
                                                                 long maxValue)
      • contains

        public java.lang.Boolean contains​(java.lang.String other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        contains in interface IPAddressProvider
        Returns:
      • prefixContains

        public java.lang.Boolean prefixContains​(java.lang.String other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        prefixContains in interface IPAddressProvider
        Returns:
      • prefixEquals

        public java.lang.Boolean prefixEquals​(java.lang.String other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        prefixEquals in interface IPAddressProvider
        Returns:
      • contains

        public java.lang.Boolean contains​(IPAddressProvider other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        contains in interface IPAddressProvider
        Returns:
      • parsedEquals

        public java.lang.Boolean parsedEquals​(IPAddressProvider other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        parsedEquals in interface IPAddressProvider
        Returns:
      • prefixContains

        public java.lang.Boolean prefixContains​(IPAddressProvider other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        prefixContains in interface IPAddressProvider
        Returns:
      • prefixEquals

        public java.lang.Boolean prefixEquals​(IPAddressProvider other)
        Description copied from interface: IPAddressProvider
        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.
        Specified by:
        prefixEquals in interface IPAddressProvider
        Returns:
      • isProvidingIPv6

        public boolean isProvidingIPv6()
      • isProvidingIPv4

        public boolean isProvidingIPv4()
      • hasPrefixSeparator

        public boolean hasPrefixSeparator()
      • isProvidingBase85IPv6

        public boolean isProvidingBase85IPv6()
      • isProvidingMixedIPv6

        public boolean isProvidingMixedIPv6()
      • toString

        public java.lang.String toString()
      • getSegmentCount

        public int getSegmentCount()
      • isProvidingEmpty

        public boolean isProvidingEmpty()