java.lang.Object
inet.ipaddr.format.AddressDivisionGroupingBase
inet.ipaddr.format.standard.AddressDivisionGrouping
- All Implemented Interfaces:
AddressDivisionSeries
,AddressItem
,AddressStringDivisionSeries
,Serializable
,Comparable<AddressItem>
- Direct Known Subclasses:
IPAddressDivisionGrouping
,MACAddressSection
AddressDivisionGrouping objects consist of a series of AddressDivision objects, each division containing one or more segments.
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.
- Author:
- sfoley
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
static class
Represents a clear way to create a specific type of string. -
Constructor Summary
ConstructorsConstructorDescriptionAddressDivisionGrouping
(AddressDivision[] divisions) AddressDivisionGrouping
(AddressDivision[] divisions, boolean checkDivisions) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsPrefixBlock
(int prefixLength) Returns whether the values of this division grouping contain the prefix block for the given prefix lengthboolean
containsSinglePrefixBlock
(int prefixLength) Returns whether the values of this division grouping match the prefix block for the given prefix lengthboolean
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.getDivision
(int index) int
hashCode()
Methods inherited from class inet.ipaddr.format.AddressDivisionGroupingBase
getBytes, getBytes, getBytes, getCount, getDivisionCount, getDivisionStrings, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLength, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isFullRange, isMax, isMultiple, isPrefixBlock, isPrefixed, isSinglePrefixBlock, isZero, toString
Methods inherited from interface inet.ipaddr.format.AddressDivisionSeries
getBitCount, getBlockCount, getPrefixCount, getSequentialBlockIndex, isMore, isSequential
Methods inherited from interface inet.ipaddr.format.AddressItem
compareTo, getByteCount
-
Constructor Details
-
AddressDivisionGrouping
-
AddressDivisionGrouping
-
-
Method Details
-
getDivision
- Specified by:
getDivision
in interfaceAddressDivisionSeries
- Specified by:
getDivision
in interfaceAddressStringDivisionSeries
- Overrides:
getDivision
in classAddressDivisionGroupingBase
- Returns:
- the given division in this series. The first is at index 0.
-
containsPrefixBlock
public boolean containsPrefixBlock(int prefixLength) Returns whether the values of this division grouping contain the prefix block for the given prefix length- Parameters:
prefixLength
-- Returns:
-
containsSinglePrefixBlock
public boolean containsSinglePrefixBlock(int prefixLength) Returns whether the values of this division grouping match the prefix block for the given prefix length- Parameters:
prefixLength
-- Returns:
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAddressDivisionGroupingBase
-
equals
Description copied from class:AddressDivisionGroupingBase
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.- Overrides:
equals
in classAddressDivisionGroupingBase
-