Package com.clickhouse.data.value
Class UnsignedByte
java.lang.Object
java.lang.Number
com.clickhouse.data.value.UnsignedByte
- All Implemented Interfaces:
Serializable,Comparable<UnsignedByte>
A wrapper class for unsigned
byte.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final UnsignedBytestatic final UnsignedBytestatic final UnsignedBytestatic final UnsignedByte -
Method Summary
Modifier and TypeMethodDescriptionadd(UnsignedByte val) Returns anUnsignedBytewhose value is(this + val).intdivide(UnsignedByte val) Returns anUnsignedBytewhose value is(this / val).doublebooleanfloatinthashCode()intintValue()longmultiply(UnsignedByte val) Returns anUnsignedBytewhose value is(this * val).remainder(UnsignedByte val) Returns anUnsignedBytewhose value is(this % val).subtract(UnsignedByte val) Returns anUnsignedBytewhose value is(this - val).toString()static StringtoString(byte b) Returns aStringobject representing the specified unsigned byte.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 UnsignedBytevalueOf(byte b) Returns aUnsignedByteinstance representing the specifiedbytevalue.static UnsignedByteReturns aUnsignedByteobject holding the value of the specifiedString.static UnsignedByteReturns aUnsignedByteobject 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
-
MIN_VALUE
-
MAX_VALUE
-
-
Method Details
-
toString
Returns aStringobject representing the specified unsigned byte.- Parameters:
b- an unsigned byte to be converted- Returns:
- a string representation of the argument in base 10
-
valueOf
Returns aUnsignedByteinstance representing the specifiedbytevalue.- Parameters:
b- a byte value- Returns:
- a
UnsignedByteinstance representingl
-
valueOf
Returns aUnsignedByteobject holding the value of the specifiedString.- Parameters:
s- non-empty string- Returns:
- a
UnsignedByteinstance representings
-
valueOf
Returns aUnsignedByteobject 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
byterepresented by the string argument in the specified radix - Throws:
NumberFormatException- if theStringdoes not contain a parsablebyte
-
add
Returns anUnsignedBytewhose value is(this + val). If the result would have more than 8 bits, returns the low 8 bits of the result.- Parameters:
val- value to be added to this unsigned byte, null is treated as zero- Returns:
this + val
-
subtract
Returns anUnsignedBytewhose value is(this - val). If the result would have more than 8 bits, returns the low 8 bits of the result.- Parameters:
val- value to be subtracted from this unsigned byte, null is treated as zero- Returns:
this - val
-
multiply
Returns anUnsignedBytewhose value is(this * val). If the result would have more than 8 bits, returns the low 8 bits of the result.- Parameters:
val- value to be multiplied by this unsigned byte, null is treated as zero- Returns:
this * val
-
divide
Returns anUnsignedBytewhose 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 anUnsignedBytewhose value is(this % val).- Parameters:
val- value by which this unsigned byte 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<UnsignedByte>
-
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
-