public class AddressDivisionGrouping extends AddressDivisionGroupingBase
AddressDivisionGrouping objects are immutable. This also makes them thread-safe.
AddressDivision objects use long to represent their values, so this places a cap on the size of the divisions in AddressDivisionGrouping.
Modifier and Type | Class and Description |
---|---|
static interface |
AddressDivisionGrouping.DivisionLengthProvider |
static interface |
AddressDivisionGrouping.DivisionValueProvider |
static class |
AddressDivisionGrouping.StringOptions
Represents a clear way to create a specific type of string.
|
Constructor and Description |
---|
AddressDivisionGrouping(AddressDivision[] divisions) |
AddressDivisionGrouping(AddressDivision[] divisions,
boolean checkDivisions) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsPrefixBlock(int prefixLength)
Returns whether the values of this division grouping contain the prefix block for the given prefix length
|
boolean |
containsSinglePrefixBlock(int prefixLength)
Returns whether the values of this division grouping match the prefix block for the given prefix length
|
boolean |
equals(Object o)
Two groupings are equal if:
- they match type/version (ipv4, ipv6, mac, or a specific grouping class)
- they match division counts
- each division matches bit counts
- each division matches their specific grouping class
- each division matches values
Prefix lengths, for those groupings and/or divisionsS that have them, are ignored.
|
AddressDivision |
getDivision(int index) |
int |
hashCode() |
getBytes, getBytes, getBytes, getCount, getDivisionCount, getDivisionStrings, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLength, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isFullRange, isMax, isMultiple, isPrefixBlock, isPrefixed, isSequential, isSinglePrefixBlock, isZero, toString
getBitCount, getBlockCount, getPrefixCount, getSequentialBlockIndex, isMore
compareTo, getBitsForCount, getBlockSize, getByteCount
public AddressDivisionGrouping(AddressDivision[] divisions)
public AddressDivisionGrouping(AddressDivision[] divisions, boolean checkDivisions)
public AddressDivision getDivision(int index)
getDivision
in interface AddressDivisionSeries
getDivision
in interface AddressStringDivisionSeries
getDivision
in class AddressDivisionGroupingBase
public boolean containsPrefixBlock(int prefixLength)
prefixLength
- public boolean containsSinglePrefixBlock(int prefixLength)
prefixLength
- public int hashCode()
hashCode
in class AddressDivisionGroupingBase
public boolean equals(Object o)
AddressDivisionGroupingBase
equals
in class AddressDivisionGroupingBase