public class IPAddressLargeDivision extends AddressDivisionBase implements IPAddressGenericDivision
For a bit count less than or equal to 63 bits, AddressDivision or IPAddressDivision is a more efficient choice,
which are based on arithmetic using longs and can be grouped with AddressDivisionGrouping and IPAddressDivisionGrouping respectively.
| Modifier and Type | Field and Description |
|---|---|
static char[] |
EXTENDED_DIGITS |
static char |
EXTENDED_DIGITS_RANGE_SEPARATOR |
static java.lang.String |
EXTENDED_DIGITS_RANGE_SEPARATOR_STR |
| Constructor and Description |
|---|
IPAddressLargeDivision(byte[] bytes,
byte[] upperBytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
java.lang.Integer prefixLength) |
IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix) |
IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
java.lang.Integer prefixLength) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other)
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.
|
int |
getBitCount() |
int |
getDefaultTextualRadix() |
int |
getDigitCount(int radix)
Returns the count of digits of the value, or if a range, the larger value in the range
|
java.lang.Integer |
getDivisionPrefixLength() |
int |
getMaxDigitCount() |
int |
getMaxDigitCount(int radix)
Returns the count of digits of the largest possible value
|
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.math.BigInteger |
getUpperValue() |
java.math.BigInteger |
getValue() |
java.lang.String |
getWildcardString()
Produces a string to represent the segment, favouring wildcards and range characters over the network prefix to represent subnets.
|
boolean |
includesMax() |
boolean |
includesZero() |
boolean |
isBoundedBy(int val)
Returns true if the possible values of this division fall below the given boundary value.
|
boolean |
isMax() |
boolean |
isMultiple()
Whether this represents multiple potential values (eg a prefixed address or a segment representing a range of values)
|
boolean |
isPrefixBlock()
Returns whether the division range includes the block of values for its prefix length
|
boolean |
isPrefixed() |
boolean |
isSinglePrefixBlock()
Returns whether the division range matches the block of values for its prefix length
|
boolean |
isZero() |
getBytes, getBytes, getBytes, getDigitCount, getLowerStandardString, getStandardString, getUpperBytes, getUpperBytes, getUpperBytes, hashCode, toStringisFullRangecompareTo, containsPrefixBlock, containsSinglePrefixBlock, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, testRange, testRangegetLowerStandardString, getStandardStringpublic static final char EXTENDED_DIGITS_RANGE_SEPARATOR
public static final java.lang.String EXTENDED_DIGITS_RANGE_SEPARATOR_STR
public static final char[] EXTENDED_DIGITS
public IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix)
throws AddressValueException
AddressValueExceptionpublic IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
java.lang.Integer prefixLength)
throws AddressValueException
bytes - bitCount - defaultRadix - network - can be null if prefixLength is nullprefixLength - AddressValueExceptionpublic IPAddressLargeDivision(byte[] bytes,
byte[] upperBytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
java.lang.Integer prefixLength)
throws AddressValueException
AddressValueExceptionpublic java.math.BigInteger getValue()
getValue in interface AddressItempublic java.math.BigInteger getUpperValue()
getUpperValue in interface AddressItempublic boolean isBoundedBy(int val)
AddressStringDivisionisBoundedBy in interface AddressStringDivisionpublic int getDigitCount(int radix)
AddressStringDivisiongetDigitCount in interface AddressStringDivisionpublic int getBitCount()
getBitCount in interface AddressItemgetBitCount in interface IPAddressStringDivisionpublic boolean isMultiple()
AddressItemisMultiple in interface AddressItempublic boolean includesZero()
includesZero in interface AddressItempublic boolean includesMax()
includesMax in interface AddressItempublic boolean isMax()
isMax in interface AddressItempublic boolean isZero()
isZero in interface AddressItempublic int getDefaultTextualRadix()
public int getMaxDigitCount()
public int getMaxDigitCount(int radix)
AddressStringDivisiongetMaxDigitCount in interface AddressStringDivisionpublic java.lang.String getString()
public java.lang.String getWildcardString()
public int getPrefixAdjustedRangeString(int segmentIndex,
AddressSegmentParams params,
java.lang.StringBuilder appendable)
IPAddressStringDivisiongetPrefixAdjustedRangeString in interface IPAddressStringDivisionpublic boolean isPrefixBlock()
IPAddressStringDivisionisPrefixBlock in interface IPAddressStringDivisionpublic boolean isSinglePrefixBlock()
isSinglePrefixBlock in interface IPAddressStringDivisionpublic java.lang.Integer getDivisionPrefixLength()
getDivisionPrefixLength in interface IPAddressStringDivisionpublic boolean isPrefixed()
isPrefixed in interface IPAddressGenericDivisionpublic boolean equals(java.lang.Object other)
AddressDivisionBaseequals in class AddressDivisionBase