inet.ipaddr.format

Class IPAddressLargeDivision

    • Field Detail

      • EXTENDED_DIGITS_RANGE_SEPARATOR

        public static final char EXTENDED_DIGITS_RANGE_SEPARATOR
        See Also:
        Constant Field Values
      • EXTENDED_DIGITS_RANGE_SEPARATOR_STR

        public static final java.lang.String EXTENDED_DIGITS_RANGE_SEPARATOR_STR
      • EXTENDED_DIGITS

        public static final char[] EXTENDED_DIGITS
    • Method Detail

      • getCount

        public java.math.BigInteger getCount()
        Description copied from interface: AddressItem
        The count of possible distinct values for this AddressComponent. If not multiple, this is 1. For instance, if this is the ip address series subnet 0::/64, then the count is 2 to the power of 64. If this is a the segment 3-7, then the count is 5.
        Specified by:
        getCount in interface AddressItem
        Returns:
      • isMultiple

        public boolean isMultiple()
        Description copied from interface: AddressItem
        Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values)
        Specified by:
        isMultiple in interface AddressItem
      • includesZero

        public boolean includesZero()
        Specified by:
        includesZero in interface AddressItem
        Returns:
        whether this item includes the value of zero within its range
      • includesMax

        public boolean includesMax()
        Specified by:
        includesMax in interface AddressItem
        Returns:
        whether this item includes the maximum possible value within its range
      • isMax

        public boolean isMax()
        Specified by:
        isMax in interface AddressItem
        Returns:
        whether this item matches the maximum possible value
      • isZero

        public boolean isZero()
        Specified by:
        isZero in interface AddressItem
        Returns:
        whether this item matches the value of zero
      • isFullRange

        public boolean isFullRange()
        Specified by:
        isFullRange in interface AddressItem
        Specified by:
        isFullRange in interface IPAddressStringDivision
        Returns:
        whether this address item represents all possible values attainable by an address item of this type, or in other words, both includesZero() and includesMax() return true
      • getDefaultTextualRadix

        public int getDefaultTextualRadix()
        Specified by:
        getDefaultTextualRadix in class AddressDivisionBase
        Returns:
        the default radix for textual representations of addresses (10 for IPv4, 16 for IPv6)
      • getMaxDigitCount

        public int getMaxDigitCount()
        Specified by:
        getMaxDigitCount in class AddressDivisionBase
        Returns:
        the number of digits for the maximum possible value of the division when using the default radix
      • getString

        public java.lang.String getString()
        Produces a normalized string to represent the segment. If the segment CIDR prefix length covers the range, then it is assumed to be a CIDR, and the string has only the lower value of the CIDR range. Otherwise, the explicit range will be printed.
        Overrides:
        getString in class AddressDivisionBase
        Returns:
      • getWildcardString

        public java.lang.String getWildcardString()
        Produces a string to represent the segment, favouring wildcards and range characters over the network prefix to represent subnets. If it exists, the segment CIDR prefix is ignored and the explicit range is printed.
        Returns:
      • getPrefixAdjustedRangeString

        public int getPrefixAdjustedRangeString(int segmentIndex,
                                                AddressSegmentParams params,
                                                java.lang.StringBuilder appendable)
        Description copied from interface: IPAddressStringDivision
        Produces a string to represent the segment of the form a-b where the value b has been adjusted for the prefix, anything beyond the prefix length being zero.
        Specified by:
        getPrefixAdjustedRangeString in interface IPAddressStringDivision
        Returns:
        if the supplied appendable is null, returns the length of the string that would have been appended, otherwise returns 0
      • isSinglePrefixBlock

        public boolean isSinglePrefixBlock()
        Returns whether the division range matches the block of values for its prefix length
        Specified by:
        isSinglePrefixBlock in interface IPAddressStringDivision
      • isPrefixed

        public boolean isPrefixed()
      • isPrefixBlock

        public boolean isPrefixBlock(int divisionPrefixLen)