public abstract class IPAddressDivision extends AddressDivision implements IPAddressStringDivision
Modifier and Type | Method and Description |
---|---|
java.lang.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.
|
java.lang.Integer |
getDivisionPrefixLength()
Returns the network prefix for the division.
|
int |
getPrefixAdjustedRangeString(int segmentIndex,
AddressSegmentParams params,
java.lang.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.
|
java.lang.String |
getString()
Produces a normalized string to represent the segment.
|
java.lang.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 |
isPrefixBlock(int divisionPrefixLen) |
boolean |
isPrefixed() |
boolean |
isSinglePrefixBlock()
Returns whether the division range matches the block of values for its prefix length
|
boolean |
isSinglePrefixBlock(int divisionPrefixLen)
Returns whether the division range matches exactly the block of values for the given prefix length.
|
boolean |
matchesWithPrefixMask(long value,
java.lang.Integer divisionPrefixLen) |
compareTo, getCount, getDigitCount, getDivisionPrefixCount, getDivisionValueCount, getLowerValue, getMaxDigitCount, getMaxValue, getUpperValue, hasUppercaseVariations, includesMax, includesZero, isBoundedBy, isFullRange, isMax, isMultiple, isZero, matches, matchesWithMask, matchesWithMask
getBytes, getBytes, getDefaultTextualRadix, getDigitCount, getLowerStandardString, getMaxDigitCount, getStandardString, getUpperBytes, getUpperBytes, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBitCount, isFullRange
getDigitCount, getLowerStandardString, getMaxDigitCount, getStandardString, isBoundedBy
getBitCount
public boolean isPrefixed()
public java.lang.Integer getDivisionPrefixLength()
getDivisionPrefixLength
in interface IPAddressStringDivision
public boolean matchesWithPrefixMask(long value, java.lang.Integer divisionPrefixLen)
public java.lang.Integer getBlockMaskPrefixLength(boolean network)
network
- whether to check for a network mask or a host maskIPAddressSection.getPrefixLengthForSingleBlock()
public boolean isPrefixBlock(int divisionPrefixLen)
public boolean isPrefixBlock()
IPAddressStringDivision
isPrefixBlock
in interface IPAddressStringDivision
public boolean isSinglePrefixBlock(int divisionPrefixLen)
divisionPrefixLen
- public boolean isSinglePrefixBlock()
IPAddressStringDivision
isSinglePrefixBlock
in interface IPAddressStringDivision
public java.lang.String getString()
getString
in class AddressDivisionBase
public java.lang.String getWildcardString()
public int getPrefixAdjustedRangeString(int segmentIndex, AddressSegmentParams params, java.lang.StringBuilder appendable)
IPAddressStringDivision
getPrefixAdjustedRangeString
in interface IPAddressStringDivision