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, toString
isFullRange
compareTo, containsPrefixBlock, containsSinglePrefixBlock, getBitsForCount, getBlockSize, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes
getLowerStandardString, getStandardString
public 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
AddressValueException
public IPAddressLargeDivision(byte[] bytes, int bitCount, int defaultRadix, IPAddressNetwork<?,?,?,?,?> network, Integer prefixLength) throws AddressValueException
bytes
- bitCount
- defaultRadix
- network
- can be null if prefixLength is nullprefixLength
- AddressValueException
public IPAddressLargeDivision(byte[] bytes, byte[] upperBytes, int bitCount, int defaultRadix, IPAddressNetwork<?,?,?,?,?> network, Integer prefixLength) throws AddressValueException
AddressValueException
public BigInteger getValue()
AddressItem
getValue
in interface AddressItem
public BigInteger getUpperValue()
AddressItem
getUpperValue
in interface AddressItem
public boolean isBoundedBy(int val)
AddressStringDivision
isBoundedBy
in interface AddressStringDivision
public int getDigitCount(int radix)
AddressStringDivision
getDigitCount
in interface AddressStringDivision
public int getBitCount()
AddressItem
getBitCount
in interface AddressItem
getBitCount
in interface IPAddressStringDivision
public boolean isMultiple()
AddressItem
isMultiple
in interface AddressItem
public boolean includesZero()
AddressItem
includesZero
in interface AddressItem
public boolean includesMax()
AddressItem
includesMax
in interface AddressItem
public boolean isMax()
AddressItem
isMax
in interface AddressItem
public boolean isZero()
AddressItem
isZero
in interface AddressItem
public int getDefaultTextualRadix()
public int getMaxDigitCount()
public int getMaxDigitCount(int radix)
AddressStringDivision
getMaxDigitCount
in interface AddressStringDivision
public String getString()
public String getWildcardString()
public int getPrefixAdjustedRangeString(int segmentIndex, AddressSegmentParams params, StringBuilder appendable)
IPAddressStringDivision
getPrefixAdjustedRangeString
in interface IPAddressStringDivision
public boolean isPrefixBlock()
IPAddressStringDivision
isPrefixBlock
in interface IPAddressStringDivision
public boolean isSinglePrefixBlock()
isSinglePrefixBlock
in interface IPAddressStringDivision
public Integer getDivisionPrefixLength()
getDivisionPrefixLength
in interface IPAddressStringDivision
public boolean isPrefixed()
isPrefixed
in interface IPAddressGenericDivision
public boolean equals(Object other)
AddressDivisionBase
equals
in class AddressDivisionBase