inet.ipaddr.format

Interface IPAddressStringDivisionSeries

    • Method Detail

      • isPrefixBlock

        boolean isPrefixBlock()
        Returns whether this address section represents a subnet block of addresses corresponding to the prefix of this series. Returns false if it has no prefix length, if it is a single address with a prefix length (ie not a subnet), or if it is a range of addresses that does not include the entire subnet block for its prefix length. If AddressNetwork.getPrefixConfiguration() is set to consider all prefixes as subnets, this returns true for any section with a non-null prefix length.
        Returns:
      • isPrefixed

        boolean isPrefixed()
        Whether there exists a prefix length
      • getPrefixLength

        java.lang.Integer getPrefixLength()
        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.
        Returns:
        the prefix length or null if there is none