- java.lang.Object
-
- inet.ipaddr.format.AddressDivisionBase
-
- inet.ipaddr.format.standard.AddressDivision
-
- inet.ipaddr.format.standard.IPAddressDivision
-
- inet.ipaddr.format.standard.IPAddressBitsDivision
-
- All Implemented Interfaces:
AddressGenericDivision
,AddressItem
,IPAddressGenericDivision
,AddressStringDivision
,IPAddressStringDivision
,java.io.Serializable
,java.lang.Comparable<AddressItem>
public class IPAddressBitsDivision extends IPAddressDivision
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class inet.ipaddr.format.standard.AddressDivision
AddressDivision.BitwiseOrResult, AddressDivision.MaskResult
-
-
Field Summary
-
Fields inherited from class inet.ipaddr.format.AddressDivisionBase
EXTENDED_DIGITS
-
-
Constructor Summary
Constructors Constructor Description IPAddressBitsDivision(long value, long upperValue, int bitCount, int defaultRadix)
Constructs a division with the given values, the given number of bits, and the given radix for printing the values.IPAddressBitsDivision(long value, long upperValue, int bitCount, int defaultRadix, IPAddressNetwork<?,?,?,?,?> network, java.lang.Integer networkPrefixLength)
Constructs a division with the given values and prefix length, the given number of bits, and the given radix for printing the values.IPAddressBitsDivision(long value, long upperValue, int bitCount, int defaultRadix, java.lang.Integer networkPrefixLength)
Constructs a division with the given values and prefix length, the given number of bits, and the given radix for printing the values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
Provides the number of bits comprising this address itemint
getDefaultTextualRadix()
long
getDivisionValue()
int
getMaxDigitCount()
long
getUpperDivisionValue()
-
Methods inherited from class inet.ipaddr.format.standard.IPAddressDivision
containsPrefixBlock, containsSinglePrefixBlock, getBlockMaskPrefixLength, getDivisionPrefixLength, getLeadingBitCount, getPrefixAdjustedRangeString, getString, getTrailingBitCount, getWildcardString, isPrefixBlock, isPrefixed, isSinglePrefixBlock, matchesWithPrefixMask
-
Methods inherited from class inet.ipaddr.format.standard.AddressDivision
bitwiseOrRange, getDigitCount, getMaxDigitCount, getMaxValue, getMinPrefixLengthForBlock, getPrefixLengthForSingleBlock, getUpperValue, getValue, hashCode, hasUppercaseVariations, includesMax, includesZero, isBitwiseOrCompatibleWithRange, isBoundedBy, isMaskCompatibleWithRange, isMax, isMultiple, isZero, maskRange, matches, matchesWithMask, matchesWithMask
-
Methods inherited from class inet.ipaddr.format.AddressDivisionBase
getBytes, getBytes, getBytes, getDigitCount, getDigitCount, getLowerStandardString, getStandardString, getUpperBytes, getUpperBytes, getUpperBytes, toString
-
Methods inherited from interface inet.ipaddr.format.AddressItem
compareTo, getByteCount, getBytes, getBytes, getBytes, getCount, getMinPrefixLengthForBlock, getPrefixCount, getPrefixLengthForSingleBlock, getUpperBytes, getUpperBytes, getUpperBytes, getUpperValue, getValue, includesMax, includesZero, isMax, isMultiple, isZero
-
Methods inherited from interface inet.ipaddr.format.string.AddressStringDivision
getDigitCount, getLowerStandardString, getMaxDigitCount, getStandardString, isBoundedBy
-
Methods inherited from interface inet.ipaddr.format.IPAddressGenericDivision
isFullRange
-
-
-
-
Constructor Detail
-
IPAddressBitsDivision
public IPAddressBitsDivision(long value, long upperValue, int bitCount, int defaultRadix)
Constructs a division with the given values, the given number of bits, and the given radix for printing the values.- Parameters:
value
-upperValue
-bitCount
-defaultRadix
-
-
IPAddressBitsDivision
public IPAddressBitsDivision(long value, long upperValue, int bitCount, int defaultRadix, java.lang.Integer networkPrefixLength)
Constructs a division with the given values and prefix length, the given number of bits, and the given radix for printing the values.- Parameters:
value
-upperValue
-bitCount
-defaultRadix
-networkPrefixLength
-
-
IPAddressBitsDivision
public IPAddressBitsDivision(long value, long upperValue, int bitCount, int defaultRadix, IPAddressNetwork<?,?,?,?,?> network, java.lang.Integer networkPrefixLength)
Constructs a division with the given values and prefix length, the given number of bits, and the given radix for printing the values.- Parameters:
value
-upperValue
-bitCount
-defaultRadix
-network
-networkPrefixLength
-
-
-
Method Detail
-
getBitCount
public int getBitCount()
Description copied from interface:AddressItem
Provides the number of bits comprising this address item- Returns:
- the number of bits
-
getDivisionValue
public long getDivisionValue()
- Specified by:
getDivisionValue
in classAddressDivision
-
getUpperDivisionValue
public long getUpperDivisionValue()
- Specified by:
getUpperDivisionValue
in classAddressDivision
-
equals
public boolean equals(java.lang.Object other)
Description copied from class:AddressDivisionBase
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.- Overrides:
equals
in classAddressDivision
-
getDefaultTextualRadix
public int getDefaultTextualRadix()
-
getMaxDigitCount
public int getMaxDigitCount()
-
-