public abstract class IPAddressDivision extends AddressDivision
Modifier and Type | Field and Description |
---|---|
static boolean |
ADJUST_RANGES_BY_PREFIX |
Modifier and Type | Method and Description |
---|---|
int |
getConfiguredString(int segmentIndex,
AddressSegmentParams params,
java.lang.StringBuilder appendable)
Produces a string to represent the segment.
|
java.lang.Integer |
getDivisionPrefixLength()
Returns the network prefix for the division.
|
java.lang.Integer |
getMaskPrefixLength(boolean network)
If this is equivalent to the mask for a CIDR prefix, it returns that prefix length.
|
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 |
isBitwiseOrCompatibleWithRange(long maskValue,
java.lang.Integer divisionPrefixLen) |
boolean |
isMaskCompatibleWithRange(long maskValue,
java.lang.Integer divisionPrefixLen) |
boolean |
isPrefixed() |
boolean |
isRangeEquivalent(java.lang.Integer divisionPrefixLen) |
boolean |
isRangeEquivalentToPrefix() |
boolean |
isRangeUnchanged(java.lang.Integer divisionPrefixLen) |
boolean |
isSamePrefixedRange(long lowerValue) |
boolean |
matchesWithPrefix(long value,
java.lang.Integer divisionPrefixLen) |
compareTo, getCount, getDigitCount, getDivisionValueCount, getLowerValue, getMaxDigitCount, getMaxValue, getUpperValue, hasUppercaseVariations, isBoundedBy, isFullRange, isMultiple, isZero, matches, matchesWithMask
getBytes, getBytes, getDefaultTextualRadix, getDigitCount, getMaxDigitCount, getPrefixAdjustedString, getStandardString, getUpperBytes, getUpperBytes, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBitCount
public static final boolean ADJUST_RANGES_BY_PREFIX
public boolean isPrefixed()
public java.lang.Integer getDivisionPrefixLength()
public boolean matchesWithPrefix(long value, java.lang.Integer divisionPrefixLen)
public java.lang.Integer getMaskPrefixLength(boolean network)
network
- whether to check for a network mask or a host maskIPAddressSection.getEquivalentPrefix()
public boolean isSamePrefixedRange(long lowerValue)
lowerValue
- public boolean isRangeEquivalent(java.lang.Integer divisionPrefixLen)
divisionPrefixLen
- public boolean isRangeUnchanged(java.lang.Integer divisionPrefixLen)
divisionPrefixLen
- public boolean isRangeEquivalentToPrefix()
public boolean isBitwiseOrCompatibleWithRange(long maskValue, java.lang.Integer divisionPrefixLen)
public boolean isMaskCompatibleWithRange(long maskValue, java.lang.Integer divisionPrefixLen)
public java.lang.String getString()
getString
in class AddressDivisionBase
public java.lang.String getWildcardString()
public int getConfiguredString(int segmentIndex, AddressSegmentParams params, java.lang.StringBuilder appendable)
Use this instead of #getString(Wildcards, int, String, int, boolean, boolean, char, boolean, StringBuilder)
if you wish to avoid printing wildcards in the host section of the address.
Instead, this method will rely on the prefix length instead.
Use this instead of getString() if you have a customized wildcard or range separator or you have a non-zero leadingZeroCount, or you have a string prefix, or you have a non-default radix (for IPv4 default radix is 10, for IPv6 it is 16)
getConfiguredString
in interface AddressStringDivision
getConfiguredString
in class AddressDivisionBase