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_RANGE_SEPARATOR |
static String |
EXTENDED_DIGITS_RANGE_SEPARATOR_STR |
EXTENDED_DIGITS| Constructor and Description |
|---|
IPAddressLargeDivision(byte[] bytes,
byte[] upperBytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
Integer prefixLength) |
IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix) |
IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
Integer prefixLength) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(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()
Provides the number of bits comprising this address item
|
int |
getDefaultTextualRadix() |
int |
getDigitCount(int radix)
Returns the count of digits of the value, or if a range, the larger value in the range
|
Integer |
getDivisionPrefixLength() |
int |
getMaxDigitCount() |
int |
getMaxDigitCount(int radix)
Returns the count of digits of the largest possible value
|
int |
getPrefixAdjustedRangeString(int segmentIndex,
AddressSegmentParams params,
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.
|
String |
getString()
Produces a normalized string to represent the segment.
|
BigInteger |
getUpperValue()
Returns the highest value represented by this address item, the highest value included in the range of values
|
BigInteger |
getValue()
Returns the lowest value represented by this address item, the lowest value included in the range of values
|
String |
getWildcardString()
Produces a string to represent the segment, favouring wildcards and range characters over the network prefix to represent subnets.
|
boolean |
includesMax()
Returns whether this item includes the maximum possible value for the address type or version within its range
|
boolean |
includesZero()
Returns whether this item includes the value of zero within its range
|
boolean |
isBoundedBy(int val)
Returns true if the possible values of this division fall below the given boundary value.
|
boolean |
isMax()
Returns whether this item matches the maximum possible value for the address type or version
|
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()
Returns whether this item matches the value of zero
|
getBytes, getBytes, getBytes, getDigitCount, getDigitCount, getLowerStandardString, getStandardString, getUpperBytes, getUpperBytes, getUpperBytes, hashCode, toStringisFullRangecompareTo, containsPrefixBlock, containsSinglePrefixBlock, getBitsForCount, getBlockSize, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytesgetLowerStandardString, getStandardStringpublic static final char EXTENDED_DIGITS_RANGE_SEPARATOR
public static final String EXTENDED_DIGITS_RANGE_SEPARATOR_STR
public IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix)
throws AddressValueException
AddressValueExceptionpublic IPAddressLargeDivision(byte[] bytes,
int bitCount,
int defaultRadix,
IPAddressNetwork<?,?,?,?,?> network,
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,
Integer prefixLength)
throws AddressValueException
AddressValueExceptionpublic BigInteger getValue()
AddressItemgetValue in interface AddressItempublic BigInteger getUpperValue()
AddressItemgetUpperValue in interface AddressItempublic boolean isBoundedBy(int val)
AddressStringDivisionisBoundedBy in interface AddressStringDivisionpublic int getDigitCount(int radix)
AddressStringDivisiongetDigitCount in interface AddressStringDivisionpublic int getBitCount()
AddressItemgetBitCount in interface AddressItemgetBitCount in interface IPAddressStringDivisionpublic boolean isMultiple()
AddressItemisMultiple in interface AddressItempublic boolean includesZero()
AddressItemincludesZero in interface AddressItempublic boolean includesMax()
AddressItemincludesMax in interface AddressItempublic boolean isMax()
AddressItemisMax in interface AddressItempublic boolean isZero()
AddressItemisZero in interface AddressItempublic int getDefaultTextualRadix()
public int getMaxDigitCount()
public int getMaxDigitCount(int radix)
AddressStringDivisiongetMaxDigitCount in interface AddressStringDivisionpublic String getString()
public String getWildcardString()
public int getPrefixAdjustedRangeString(int segmentIndex,
AddressSegmentParams params,
StringBuilder appendable)
IPAddressStringDivisiongetPrefixAdjustedRangeString in interface IPAddressStringDivisionpublic boolean isPrefixBlock()
IPAddressStringDivisionisPrefixBlock in interface IPAddressStringDivisionpublic boolean isSinglePrefixBlock()
isSinglePrefixBlock in interface IPAddressStringDivisionpublic Integer getDivisionPrefixLength()
getDivisionPrefixLength in interface IPAddressStringDivisionpublic boolean isPrefixed()
isPrefixed in interface IPAddressGenericDivisionpublic boolean equals(Object other)
AddressDivisionBaseequals in class AddressDivisionBase