inet.ipaddr.format

Class IPAddressStringDivisionGrouping

    • Constructor Detail

      • IPAddressStringDivisionGrouping

        public IPAddressStringDivisionGrouping(AddressDivisionBase[] divisions,
                                               java.lang.Integer prefixLength)
    • Method Detail

      • getPrefixLength

        public java.lang.Integer getPrefixLength()
        Description copied from interface: IPAddressStringDivisionSeries
        The number of bits in the upper-most portion of the segment bits representing a prefix, while the remaining bits can assume all possible values. For an IP address returns the network prefix, which is 16 for an address like 1.2.0.0/16 If there is no prefix length, returns null.
        Specified by:
        getPrefixLength in interface IPAddressStringDivisionSeries
        Returns:
        the prefix length or null if there is none