public abstract class AddressDivision extends AddressDivisionBase implements java.lang.Comparable<AddressDivision>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AddressDivision other) |
java.math.BigInteger |
getCount()
The count of possible distinct values for this AddressComponent.
|
int |
getDigitCount(int radix)
Returns the count of digits of the value, or if a range, the larger value in the range
|
long |
getDivisionPrefixCount(int divisionPrefixLength) |
long |
getDivisionValueCount() |
abstract long |
getLowerValue() |
int |
getMaxDigitCount(int radix)
Returns the count of digits of the largest possible value
|
long |
getMaxValue() |
abstract long |
getUpperValue() |
boolean |
hasUppercaseVariations(int radix,
boolean lowerOnly) |
boolean |
includesMax() |
boolean |
includesZero() |
boolean |
isBoundedBy(int value)
Returns true if the possible values of this division fall below the given value.
|
boolean |
isFullRange() |
boolean |
isMax() |
boolean |
isMultiple()
Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values)
|
boolean |
isZero() |
boolean |
matches(long value) |
boolean |
matchesWithMask(long value,
long mask) |
boolean |
matchesWithMask(long lowerValue,
long upperValue,
long mask)
returns whether masking with the given mask results in a valid contiguous range for this segment,
and if it does, if it matches the range obtained when masking the given values with the same mask.
|
getBytes, getBytes, getDefaultTextualRadix, getDigitCount, getLowerStandardString, getMaxDigitCount, getStandardString, getString, getUpperBytes, getUpperBytes, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBitCount
public boolean isMultiple()
AddressItem
isMultiple
in interface AddressItem
public long getMaxValue()
public boolean isZero()
isZero
in interface AddressItem
public boolean includesZero()
includesZero
in interface AddressItem
public boolean isMax()
isMax
in interface AddressItem
public boolean includesMax()
includesMax
in interface AddressItem
public abstract long getLowerValue()
public abstract long getUpperValue()
public long getDivisionValueCount()
public long getDivisionPrefixCount(int divisionPrefixLength)
public java.math.BigInteger getCount()
AddressItem
getCount
in interface AddressItem
public boolean isBoundedBy(int value)
isBoundedBy
in interface AddressStringDivision
public boolean matches(long value)
public boolean matchesWithMask(long value, long mask)
public boolean matchesWithMask(long lowerValue, long upperValue, long mask)
lowerValue
- upperValue
- mask
- public boolean isFullRange()
isFullRange
in interface AddressItem
public int compareTo(AddressDivision other)
compareTo
in interface java.lang.Comparable<AddressDivision>
public boolean hasUppercaseVariations(int radix, boolean lowerOnly)
public int getDigitCount(int radix)
AddressStringDivision
getDigitCount
in interface AddressStringDivision
public int getMaxDigitCount(int radix)
AddressStringDivision
getMaxDigitCount
in interface AddressStringDivision