Interface IPAddressDivisionSeries
- All Superinterfaces:
AddressDivisionSeries, AddressItem, AddressStringDivisionSeries, Comparable<AddressItem>, IPAddressStringDivisionSeries, 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
Modifier and TypeMethodDescriptiongetDivision(int index) Returns the CIDR network prefix length of the series, or null if the series has no associated prefix length.Methods inherited from interface AddressDivisionSeries
getBitCount, getBlockCount, getCount, getDivisionStrings, getPrefixCount, getPrefixCount, getPrefixLength, getSequentialBlockIndex, isMore, isPrefixBlock, isPrefixed, isSequential, isSinglePrefixBlockMethods inherited from interface AddressItem
compareTo, containsPrefixBlock, containsSinglePrefixBlock, getByteCount, getBytes, getBytes, getBytes, getMinPrefixLengthForBlock, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isFullRange, isMax, isMultiple, isZeroMethods inherited from interface AddressStringDivisionSeries
getDivisionCountMethods inherited from interface IPAddressStringDivisionSeries
getNetwork, getPrefixLength, isPrefixBlock, isPrefixed
-
Method Details
-
getNetworkPrefixLength
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
- Specified by:
getDivisionin interfaceAddressDivisionSeries- Specified by:
getDivisionin interfaceAddressStringDivisionSeries- Specified by:
getDivisionin interfaceIPAddressStringDivisionSeries- Returns:
- the given division in this series. The first is at index 0.
-