public abstract class IPAddressDivision extends AddressDivision implements IPAddressGenericDivision
AddressDivision.BitwiseOrResult, AddressDivision.MaskResultEXTENDED_DIGITS| Modifier and Type | Method and Description |
|---|---|
boolean |
containsPrefixBlock(int divisionPrefixLen)
Returns whether the values of this series contains the prefix block for the given prefix length.
|
boolean |
containsSinglePrefixBlock(int divisionPrefixLen)
Returns whether the division range matches exactly the block of values for the given prefix length.
|
Integer |
getBlockMaskPrefixLength(boolean network)
If this is equivalent to the mask for a CIDR prefix length block or subnet class, it returns the prefix length.
|
Integer |
getDivisionPrefixLength()
Returns the network prefix for the division.
|
int |
getLeadingBitCount(boolean network)
Returns the number of consecutive leading one or zero bits.
|
int |
getPrefixAdjustedRangeString(int segmentIndex,
AddressSegmentParams params,
StringBuilder appendable)
Produces a string to represent the segment of the form a-b where the value b has been adjusted for the prefix, anything beyond the prefix length being zero.
|
String |
getString()
Produces a normalized string to represent the segment.
|
int |
getTrailingBitCount(boolean network)
Returns the number of consecutive trailing one or zero bits.
|
String |
getWildcardString()
Produces a string to represent the segment, favouring wildcards and range characters over the network prefix to represent subnets.
|
boolean |
isPrefixBlock()
Returns whether the division range includes the block of values for its prefix length
|
boolean |
isPrefixed() |
boolean |
isSinglePrefixBlock()
Returns whether the division range matches the block of values for its prefix length
|
boolean |
matchesWithPrefixMask(long value,
Integer divisionPrefixLen) |
bitwiseOrRange, equals, getDigitCount, getDivisionValue, getMaxDigitCount, getMaxValue, getMinPrefixLengthForBlock, getPrefixLengthForSingleBlock, getUpperDivisionValue, getUpperValue, getValue, hashCode, hasUppercaseVariations, includesMax, includesZero, isBitwiseOrCompatibleWithRange, isBoundedBy, isMaskCompatibleWithRange, isMax, isMultiple, isZero, maskRange, matches, matchesWithMask, matchesWithMaskgetBytes, getBytes, getBytes, getDigitCount, getLowerStandardString, getStandardString, getUpperBytes, getUpperBytes, getUpperBytes, toStringisFullRangecompareTo, getBitCount, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isMax, isMultiple, isZerogetBitCountgetDigitCount, getLowerStandardString, getMaxDigitCount, getStandardString, isBoundedBypublic boolean isPrefixed()
isPrefixed in interface IPAddressGenericDivisionpublic Integer getDivisionPrefixLength()
getDivisionPrefixLength in interface IPAddressStringDivisionpublic boolean matchesWithPrefixMask(long value,
Integer divisionPrefixLen)
public Integer getBlockMaskPrefixLength(boolean network)
Also, keep in mind that the prefix length returned by this method is not equivalent to the prefix length used to construct this object. The prefix length used to construct indicates the network and host portion of this address. The prefix length returned here indicates the whether the value of this address can be used as a mask for the network and host of an address with that prefix length. Therefore the two values can be different values, or one can be null while the other is not.
This method applies only to the lower value of the range if this segment represents multiple values.
network - whether to check for a network mask or a host maskIPAddressSection.getPrefixLengthForSingleBlock()public int getTrailingBitCount(boolean network)
This method applies only to the lower value of the range if this segment represents multiple values.
network - public int getLeadingBitCount(boolean network)
This method applies only to the lower value of the range if this segment represents multiple values.
network - public boolean containsPrefixBlock(int divisionPrefixLen)
AddressItem
Use AddressItem.getMinPrefixLengthForBlock() to determine the smallest prefix length for which this method returns true.
containsPrefixBlock in interface AddressItempublic boolean isPrefixBlock()
IPAddressStringDivisionisPrefixBlock in interface IPAddressStringDivisionpublic boolean containsSinglePrefixBlock(int divisionPrefixLen)
containsSinglePrefixBlock in interface AddressItemdivisionPrefixLen - public boolean isSinglePrefixBlock()
IPAddressStringDivisionisSinglePrefixBlock in interface IPAddressStringDivisionpublic String getString()
public String getWildcardString()
public int getPrefixAdjustedRangeString(int segmentIndex,
AddressSegmentParams params,
StringBuilder appendable)
IPAddressStringDivisiongetPrefixAdjustedRangeString in interface IPAddressStringDivision