-
- All Superinterfaces:
AddressDivisionSeries
,AddressItem
,AddressStringDivisionSeries
,java.lang.Comparable<AddressItem>
,IPAddressStringDivisionSeries
,java.io.Serializable
- All Known Subinterfaces:
IPAddressSegmentSeries
- All Known Implementing Classes:
IPAddress
,IPAddressDivisionGrouping
,IPAddressLargeDivisionGrouping
,IPAddressSection
,IPv4Address
,IPv4AddressSection
,IPv6Address
,IPv6AddressSection
,IPv6AddressSection.IPv6v4MixedAddressSection
public interface IPAddressDivisionSeries extends AddressDivisionSeries, IPAddressStringDivisionSeries
Represents a series of groups of address divisions or segments. Each group may have a different bit size. This interface is the super interface of all interfaces and classes representing a series of divisions or segments.- Author:
- sfoley
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IPAddressGenericDivision
getDivision(int index)
java.lang.Integer
getNetworkPrefixLength()
Returns the CIDR network prefix length of the series, or null if the series has no associated prefix length.-
Methods inherited from interface inet.ipaddr.format.AddressDivisionSeries
getBitCount, getBlockCount, getCount, getDivisionStrings, getPrefixCount, getPrefixCount, getPrefixLength, getSequentialBlockIndex, isMore, isPrefixBlock, isPrefixed, isSequential, isSinglePrefixBlock
-
Methods inherited from interface inet.ipaddr.format.AddressItem
compareTo, containsPrefixBlock, containsSinglePrefixBlock, getByteCount, getBytes, getBytes, getBytes, getMinPrefixLengthForBlock, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isFullRange, isMax, isMultiple, isZero
-
Methods inherited from interface inet.ipaddr.format.string.AddressStringDivisionSeries
getDivisionCount
-
Methods inherited from interface inet.ipaddr.format.string.IPAddressStringDivisionSeries
getNetwork, getPrefixLength, isPrefixBlock, isPrefixed
-
-
-
-
Method Detail
-
getNetworkPrefixLength
java.lang.Integer getNetworkPrefixLength()
Returns the CIDR network prefix length of the series, or null if the series has no associated prefix length.Equivalent to
AddressDivisionSeries.getPrefixLength()
, which is the more general concept of set of address series that share the same set of leading bits. For IP addresses and sections the prefix length and the CIDR network prefix length are the same thing.For IP addresses and sections each individual segment has an associated prefix length which is determine by the network prefix length. The segment prefix lengths follow the pattern: null, null, ...., null, x, 0, 0, ..., 0
For instance, an IPv4 address 1.2.3.4/16 has the network prefix length 16. The segment prefix lengths are [null, 8, 0, 0] The segment prefix lengths of 1.2.3.4/22 are [null, null, 6, 0]
- Returns:
-
getDivision
IPAddressGenericDivision getDivision(int index)
- Specified by:
getDivision
in interfaceAddressDivisionSeries
- Specified by:
getDivision
in interfaceAddressStringDivisionSeries
- Specified by:
getDivision
in interfaceIPAddressStringDivisionSeries
- Returns:
- the given division in this series. The first is at index 0.
-
-