public class IPAddressDivisionGrouping extends AddressDivisionGrouping implements IPAddressStringDivisionSeries
With the IPAddressSection subclass, each division is one segment (eg either groupings of 4 like 1.2.3.4 or groupings of 8 like 1:2:3:4:5:6:7:8). For IPv6, a compressed segment still counts as one of the groupings, it is simply not printed as part of the text representation. Alternative groupings include ipv4 groupings define by inet_aton (eg groupings of 1, 2, or 3 divisions like 1, 1.2, and 1.2.3) and the mixed ipv6/ipv4 representation of ipv6 addresses (eg a grouping of 10 divisions like a:b:c:d:e:f:1.2.3.4) IPAddressDivisionGrouping objects are immutable. Some of the derived state is created upon demand and cached. This also makes them thread-safe. May be associated with a prefix length, in which case that number of bits in the upper-most portion of the object represent a prefix, while the remaining bits can assume all possible values.
| Modifier and Type | Class and Description |
|---|---|
static class |
IPAddressDivisionGrouping.Range |
static class |
IPAddressDivisionGrouping.RangeList |
AddressDivisionGrouping.StringOptions| Constructor and Description |
|---|
IPAddressDivisionGrouping(IPAddressDivision[] divisions) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
IPAddressDivision |
getDivision(int index) |
java.lang.Integer |
getEquivalentPrefix()
Returns a prefix length for which the range of this segment grouping can be specified only using the section's lower value and the prefix length
If no such prefix exists, returns null
If this segment grouping represents a single value, returns the bit length
|
java.lang.Integer |
getNetworkPrefixLength() |
java.lang.Integer |
getPrefixLength()
The bit-length of the portion of the address that is not specific to an individual address but common amongst a group of addresses.
|
IPAddressDivisionGrouping.RangeList |
getZeroRangeSegments() |
IPAddressDivisionGrouping.RangeList |
getZeroSegments() |
int |
isMore(AddressDivisionSeries other)
Use this method to compare the counts of two address series.
|
boolean |
isMultipleByNetworkPrefix() |
boolean |
isMultipleByPrefix()
whether there is a prefix and it is less than the bit-count
|
boolean |
isPrefixed()
Whether there exists a prefix.
|
boolean |
isRangeEquivalentToPrefix()
whether there is a prefix and the range of values is dictated entirely by the prefix.
|
compareTo, getBitCount, getBytes, getBytes, getCount, getDivisionCount, getMinPrefix, getUpperBytes, getUpperBytes, hashCode, isFullRange, isMultiple, isRangeEquivalent, isZero, toStringgetDivisionCountpublic IPAddressDivisionGrouping(IPAddressDivision[] divisions)
public IPAddressDivision getDivision(int index)
getDivision in interface AddressDivisionSeriesgetDivision in interface AddressStringDivisionSeriesgetDivision in class AddressDivisionGroupingpublic int isMore(AddressDivisionSeries other)
AddressDivisionSeriesisMore in interface AddressDivisionSeriesisMore in class AddressDivisionGroupingpublic boolean isPrefixed()
AddressDivisionSeriesisPrefixed in interface AddressDivisionSeriesisPrefixed in interface IPAddressStringDivisionSeriesisPrefixed in class AddressDivisionGroupingpublic java.lang.Integer getPrefixLength()
AddressDivisionSeriesgetPrefixLength in interface AddressDivisionSeriesgetPrefixLength in interface IPAddressStringDivisionSeriesgetPrefixLength in class AddressDivisionGroupingpublic java.lang.Integer getNetworkPrefixLength()
public boolean isMultipleByNetworkPrefix()
public boolean isMultipleByPrefix()
AddressDivisionSeriesisMultipleByPrefix in interface AddressDivisionSeriesisMultipleByPrefix in class AddressDivisionGroupingpublic boolean isRangeEquivalentToPrefix()
AddressDivisionSeriesisRangeEquivalentToPrefix in interface AddressDivisionSeriesisRangeEquivalentToPrefix in class AddressDivisionGroupingpublic java.lang.Integer getEquivalentPrefix()
AddressDivisionGroupinggetEquivalentPrefix in interface AddressDivisionSeriesgetEquivalentPrefix in class AddressDivisionGroupingpublic boolean equals(java.lang.Object o)
equals in class AddressDivisionGroupingpublic IPAddressDivisionGrouping.RangeList getZeroSegments()
public IPAddressDivisionGrouping.RangeList getZeroRangeSegments()