- All Superinterfaces:
AddressStringDivisionSeries,Serializable
- All Known Subinterfaces:
IPAddressDivisionSeries,IPAddressSegmentSeries
- All Known Implementing Classes:
IPAddress,IPAddressDivisionGrouping,IPAddressLargeDivisionGrouping,IPAddressSection,IPv4Address,IPv4AddressSection,IPv6Address,IPv6AddressSection,IPv6AddressSection.IPv6v4MixedAddressSection
A generic part of an IP address for the purpose of producing a string for the address.
It is divided into a series of combinations of individual address divisions (
AddressDivision).
The number of such series is the division count.- Author:
- sfoley
-
Method Summary
Modifier and TypeMethodDescriptiongetDivision(int index) IPAddressNetwork<?, ?, ?, ?, ?> 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.booleanReturns whether this address section represents a subnet block of addresses corresponding to the prefix of this series.booleanWhether there exists a prefix lengthMethods inherited from interface inet.ipaddr.format.string.AddressStringDivisionSeries
getDivisionCount
-
Method Details
-
getNetwork
IPAddressNetwork<?,?, getNetwork()?, ?, ?> -
getDivision
- Specified by:
getDivisionin interfaceAddressStringDivisionSeries
-
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. IfAddressNetwork.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
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
-