Package org.miaixz.bus.core.codec
Class No128
java.lang.Object
java.lang.Number
org.miaixz.bus.core.codec.No128
- All Implemented Interfaces:
Serializable,Comparable<No128>
128位数字表示,分为:
- 最高有效位(Most Significant Bit),64 bit(8 bytes)
- 最低有效位(Least Significant Bit),64 bit(8 bytes)
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoublebooleanfloatlong获取最低有效位(Least Significant Bit),64 bit(8 bytes)long[]getLongArray(ByteOrder byteOrder) 获取高低位数组,规则为:ByteOrder.LITTLE_ENDIAN,则long[0]:低位,long[1]:高位ByteOrder.BIG_ENDIAN,则long[0]:高位,long[1]:低位long获取最高有效位(Most Significant Bit),64 bit(8 bytes)inthashCode()intintValue()longvoidsetLeastSigBits(long leastSigBits) 设置最低有效位(Least Significant Bit),64 bit(8 bytes)voidsetMostSigBits(long hiValue) 设置最高有效位(Most Significant Bit),64 bit(8 bytes)Methods inherited from class java.lang.Number
byteValue, shortValue
-
Constructor Details
-
No128
public No128(long mostSigBits, long leastSigBits) 构造- Parameters:
mostSigBits- 高位leastSigBits- 低位
-
-
Method Details
-
getMostSigBits
public long getMostSigBits()获取最高有效位(Most Significant Bit),64 bit(8 bytes)- Returns:
- 最高有效位(Most Significant Bit),64 bit(8 bytes)
-
setMostSigBits
public void setMostSigBits(long hiValue) 设置最高有效位(Most Significant Bit),64 bit(8 bytes)- Parameters:
hiValue- 最高有效位(Most Significant Bit),64 bit(8 bytes)
-
getLeastSigBits
public long getLeastSigBits()获取最低有效位(Least Significant Bit),64 bit(8 bytes)- Returns:
- 最低有效位(Least Significant Bit),64 bit(8 bytes)
-
setLeastSigBits
public void setLeastSigBits(long leastSigBits) 设置最低有效位(Least Significant Bit),64 bit(8 bytes)- Parameters:
leastSigBits- 最低有效位(Least Significant Bit),64 bit(8 bytes)
-
getLongArray
获取高低位数组,规则为:ByteOrder.LITTLE_ENDIAN,则long[0]:低位,long[1]:高位ByteOrder.BIG_ENDIAN,则long[0]:高位,long[1]:低位
- Parameters:
byteOrder- 端续- Returns:
- 高低位数组,long[0]:低位,long[1]:高位
-
intValue
public int intValue() -
longValue
public long longValue() -
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<No128>
-