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, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBitCountpublic boolean isMultiple()
AddressItemisMultiple in interface AddressItempublic long getMaxValue()
public boolean isZero()
isZero in interface AddressItempublic boolean includesZero()
includesZero in interface AddressItempublic boolean isMax()
isMax in interface AddressItempublic boolean includesMax()
includesMax in interface AddressItempublic abstract long getLowerValue()
public abstract long getUpperValue()
public long getDivisionValueCount()
public long getDivisionPrefixCount(int divisionPrefixLength)
public java.math.BigInteger getCount()
AddressItemgetCount in interface AddressItempublic boolean isBoundedBy(int value)
isBoundedBy in interface AddressStringDivisionpublic 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 AddressItempublic int compareTo(AddressDivision other)
compareTo in interface java.lang.Comparable<AddressDivision>public boolean hasUppercaseVariations(int radix,
boolean lowerOnly)
public int getDigitCount(int radix)
AddressStringDivisiongetDigitCount in interface AddressStringDivisionpublic int getMaxDigitCount(int radix)
AddressStringDivisiongetMaxDigitCount in interface AddressStringDivision