Class AddressDivisionGrouping
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 interfacestatic interfacestatic classRepresents a clear way to create a specific type of string. -
Constructor Summary
ConstructorsConstructorDescriptionAddressDivisionGrouping(AddressDivision[] divisions) AddressDivisionGrouping(AddressDivision[] divisions, boolean checkDivisions) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsPrefixBlock(int prefixLength) Returns whether the values of this division grouping contain the prefix block for the given prefix lengthbooleancontainsSinglePrefixBlock(int prefixLength) Returns whether the values of this division grouping match the prefix block for the given prefix lengthbooleanTwo 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) inthashCode()Methods inherited from class AddressDivisionGroupingBase
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, toStringMethods inherited from interface AddressDivisionSeries
getBitCount, getBlockCount, getPrefixCount, getSequentialBlockIndex, isMoreMethods inherited from interface AddressItem
compareTo, getByteCount
-
Constructor Details
-
AddressDivisionGrouping
-
AddressDivisionGrouping
-
-
Method Details
-
getDivision
- Specified by:
getDivisionin interfaceAddressDivisionSeries- Specified by:
getDivisionin interfaceAddressStringDivisionSeries- Overrides:
getDivisionin 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:
hashCodein classAddressDivisionGroupingBase
-
equals
Description copied from class:AddressDivisionGroupingBaseTwo 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:
equalsin classAddressDivisionGroupingBase
-