public abstract class AddressDivision extends AddressDivisionBase
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Two divisions are equal if they:
- they match type/version (ipv4, ipv6, mac, or a specific division class)
- match bit counts
- match values
Prefix lengths, for those divisions that have them, are ignored.
|
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) |
abstract long |
getDivisionValue() |
long |
getDivisionValueCount() |
int |
getMaxDigitCount(int radix)
Returns the count of digits of the largest possible value
|
long |
getMaxValue() |
int |
getMinPrefixLengthForBlock()
Returns the smallest prefix length possible such that this item includes the block of all values for that prefix length.
|
java.math.BigInteger |
getPrefixCount(int divisionPrefixLength)
The count of the number of distinct values within the prefix part of the address item, the bits that appear within the prefix length.
|
java.lang.Integer |
getPrefixLengthForSingleBlock()
Returns a prefix length for which the range of this item matches the block of all values for that prefix length.
|
abstract long |
getUpperDivisionValue() |
java.math.BigInteger |
getUpperValue() |
java.math.BigInteger |
getValue() |
int |
hashCode() |
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 |
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, getBytes, getDigitCount, getLowerStandardString, getStandardString, getUpperBytes, getUpperBytes, getUpperBytes, toStringcompareTo, containsPrefixBlock, containsSinglePrefixBlock, getBitCount, getByteCount, isFullRange, testRange, testRangepublic boolean isMultiple()
AddressItempublic int getMinPrefixLengthForBlock()
AddressItem
If the entire range can be dictated this way, then this method returns the same value as AddressItem.getPrefixLengthForSingleBlock().
Otherwise, this method will return the minimal possible prefix that can be paired with this address, while AddressItem.getPrefixLengthForSingleBlock() will return null.
In cases where the final bit is constant so there is no such block, this returns the bit count.
public java.lang.Integer getPrefixLengthForSingleBlock()
AddressItem
If the range can be dictated this way, then this method returns the same value as AddressItem.getMinPrefixLengthForBlock().
If no such prefix length exists, returns null.
If this item represents a single value, this returns the bit count.
public long getMaxValue()
public boolean isZero()
public boolean includesZero()
public boolean isMax()
public boolean includesMax()
public abstract long getDivisionValue()
public abstract long getUpperDivisionValue()
public int hashCode()
hashCode in class AddressDivisionBasepublic java.math.BigInteger getValue()
public java.math.BigInteger getUpperValue()
public long getDivisionValueCount()
public java.math.BigInteger getPrefixCount(int divisionPrefixLength)
AddressItempublic long getDivisionPrefixCount(int divisionPrefixLength)
public java.math.BigInteger getCount()
AddressItempublic boolean isBoundedBy(int value)
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 equals(java.lang.Object o)
AddressDivisionBaseequals in class AddressDivisionBasepublic boolean hasUppercaseVariations(int radix,
boolean lowerOnly)
public int getDigitCount(int radix)
AddressStringDivisionpublic int getMaxDigitCount(int radix)
AddressStringDivision