Package com.clickhouse.data.value
Class UnsignedInteger
java.lang.Object
java.lang.Number
com.clickhouse.data.value.UnsignedInteger
- All Implemented Interfaces:
Serializable,Comparable<UnsignedInteger>
A wrapper class for unsigned
int.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final UnsignedIntegerstatic final UnsignedIntegerstatic final UnsignedIntegerstatic final UnsignedIntegerstatic final UnsignedIntegerstatic final UnsignedInteger -
Method Summary
Modifier and TypeMethodDescriptionadd(UnsignedInteger val) Returns anUnsignedIntegerwhose value is(this + val).intdivide(UnsignedInteger val) Returns anUnsignedIntegerwhose value is(this / val).doublebooleanfloatinthashCode()intintValue()longmultiply(UnsignedInteger val) Returns anUnsignedIntegerwhose value is(this * val).remainder(UnsignedInteger val) Returns anUnsignedIntegerwhose value is(this % val).subtract(UnsignedInteger val) Returns anUnsignedIntegerwhose 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 UnsignedIntegervalueOf(int i) Returns aUnsignedIntegerinstance representing the specifiedintvalue.static UnsignedIntegerReturns aUnsignedIntegerobject holding the value of the specifiedString.static UnsignedIntegerReturns aUnsignedIntegerobject holding the value extracted from the specifiedStringwhen parsed with the radix given by the second argument.Methods inherited from class java.lang.Number
byteValue, shortValue
-
Field Details
-
BYTES
public static final int BYTES- See Also:
-
ZERO
-
ONE
-
TWO
-
TEN
-
MIN_VALUE
-
MAX_VALUE
-
-
Method Details
-
valueOf
Returns aUnsignedIntegerinstance representing the specifiedintvalue.- Parameters:
i- an int value- Returns:
- a
UnsignedIntegerinstance representingl
-
valueOf
Returns aUnsignedIntegerobject holding the value of the specifiedString.- Parameters:
s- non-empty string- Returns:
- a
UnsignedIntegerinstance representings
-
valueOf
Returns aUnsignedIntegerobject 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 parsableint
-
add
Returns anUnsignedIntegerwhose value is(this + val). If the result would have more than 32 bits, returns the low 32 bits of the result.- Parameters:
val- value to be added to this unsigned integer, null is treated as zero- Returns:
this + val
-
subtract
Returns anUnsignedIntegerwhose value is(this - val). If the result would have more than 32 bits, returns the low 32 bits of the result.- Parameters:
val- value to be subtracted from this unsigned integer, null is treated as zero- Returns:
this - val
-
multiply
Returns anUnsignedIntegerwhose value is(this * val). If the result would have more than 32 bits, returns the low 32 bits of the result.- Parameters:
val- value to be multiplied by this unsigned integer, null is treated as zero- Returns:
this * val
-
divide
Returns anUnsignedIntegerwhose 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 anUnsignedIntegerwhose value is(this % val).- Parameters:
val- value by which this unsigned integer 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() -
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
compareTo
- Specified by:
compareToin interfaceComparable<UnsignedInteger>
-
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
-