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
      • isZero

        public boolean isZero()
        Specified by:
        isZero in interface AddressItem
        Returns:
        whether this item has the value of zero
      • 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
      • isPrefixBlock

        public boolean isPrefixBlock()
      • 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(java.lang.Integer divisionPrefixLen)
        Description copied from interface: IPAddressStringDivision
        Returns whether the division range includes the block of values for its prefix length
        Specified by:
        isPrefixBlock in interface IPAddressStringDivision