Package com.clickhouse.data.value
Class UnsignedLong
java.lang.Object
java.lang.Number
com.clickhouse.data.value.UnsignedLong
- All Implemented Interfaces:
Serializable,Comparable<UnsignedLong>
A wrapper class for unsigned
long.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final BigIntegerstatic final UnsignedLongstatic final UnsignedLongstatic final UnsignedLongstatic final UnsignedLongstatic final UnsignedLongstatic final UnsignedLong -
Method Summary
Modifier and TypeMethodDescriptionadd(UnsignedLong val) Returns anUnsignedLongwhose value is(this + val).Returns the value of thisUnsignedLongas aBigInteger.intdivide(UnsignedLong val) Returns anUnsignedLongwhose value is(this / val).doublebooleanfloatinthashCode()intintValue()longmultiply(UnsignedLong val) Returns anUnsignedLongwhose value is(this * val).remainder(UnsignedLong val) Returns anUnsignedLongwhose value is(this % val).subtract(UnsignedLong val) Returns anUnsignedLongwhose value is(this - val).toString()toString(int radix) Returns a string representation of the first argument as an unsigned integer value in the radix specified by the second argument.static UnsignedLongvalueOf(long l) Returns aUnsignedLonginstance representing the specifiedlongvalue.static UnsignedLongReturns aUnsignedLongobject holding the value of the specifiedString.static UnsignedLongReturns aUnsignedLongobject holding the value extracted from the specifiedStringwhen parsed with the radix given by the second argument.static UnsignedLongvalueOf(BigInteger val) Returns aUnsignedLonginstance representing the specifiedBigIntegervalue.Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
MASK
-
BYTES
public static final int BYTES- See Also:
-
ZERO
-
ONE
-
TWO
-
TEN
-
MIN_VALUE
-
MAX_VALUE
-
-
Method Details
-
valueOf
Returns aUnsignedLonginstance representing the specifiedlongvalue.- Parameters:
l- a long value- Returns:
- a
UnsignedLonginstance representingl
-
valueOf
Returns aUnsignedLonginstance representing the specifiedBigIntegervalue.- Parameters:
val- a BigInteger value, null is treated as zero- Returns:
- a
UnsignedLonginstance representingval
-
valueOf
Returns aUnsignedLongobject holding the value of the specifiedString.- Parameters:
s- non-empty string- Returns:
- a
UnsignedLonginstance representings
-
valueOf
Returns aUnsignedLongobject holding the value extracted from the specifiedStringwhen parsed with the radix given by the second argument.- Parameters:
s- theStringcontaining the unsigned integer representation to be parsedradix- the radix to be used while parsings- Returns:
- the unsigned
longrepresented by the string argument in the specified radix - Throws:
NumberFormatException- if theStringdoes not contain a parsablelong
-
add
Returns anUnsignedLongwhose value is(this + val). If the result would have more than 64 bits, returns the low 64 bits of the result.- Parameters:
val- value to be added to this unsigned long, null is treated as zero- Returns:
this + val
-
subtract
Returns anUnsignedLongwhose value is(this - val). If the result would have more than 64 bits, returns the low 64 bits of the result.- Parameters:
val- value to be subtracted from this unsigned long, null is treated as zero- Returns:
this - val
-
multiply
Returns anUnsignedLongwhose value is(this * val). If the result would have more than 64 bits, returns the low 64 bits of the result.- Parameters:
val- value to be multiplied by this unsigned long, null is treated as zero- Returns:
this * val
-
divide
Returns anUnsignedLongwhose value is(this / val).- Parameters:
val- value by which this unsigned is to be divided, null is treated as zero- Returns:
this / val- Throws:
ArithmeticException- ifvalis null or zero.
-
remainder
Returns anUnsignedLongwhose value is(this % val).- Parameters:
val- value by which this unsigned long is to be divided, and the remainder computed- Returns:
this % val- Throws:
ArithmeticException- ifvalis null or zero.
-
intValue
public int intValue() -
longValue
public long longValue() -
bigIntegerValue
Returns the value of thisUnsignedLongas aBigInteger.- Returns:
- a BigInteger representing the unsigned long value
-
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
compareTo
- Specified by:
compareToin interfaceComparable<UnsignedLong>
-
hashCode
public int hashCode() -
equals
-
toString
-
toString
Returns a string representation of the first argument as an unsigned integer value in the radix specified by the second argument.- Parameters:
radix- the radix to use in the string representation- Returns:
- an unsigned string representation of the argument in the specified radix
-