- java.lang.Object
-
- java.lang.Number
-
- org.jooq.types.UNumber
-
- org.jooq.types.UByte
-
- All Implemented Interfaces:
Serializable
,Comparable<UByte>
public final class UByte extends UNumber implements Comparable<UByte>
Theunsigned byte
type- Author:
- Lukas Eder, Ed Schaller, Jens Nerche
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UByte
MAX
A constant holding the maximum value anunsigned byte
can have as UByte, 28-1.static short
MAX_VALUE
A constant holding the maximum value anunsigned byte
can have, 28-1.static UByte
MIN
A constant holding the minimum value anunsigned byte
can have as UByte, 0.static short
MIN_VALUE
A constant holding the minimum value anunsigned byte
can have, 0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UByte
add(int val)
UByte
add(UByte val)
int
compareTo(UByte o)
double
doubleValue()
boolean
equals(Object obj)
float
floatValue()
int
hashCode()
int
intValue()
long
longValue()
UByte
subtract(int val)
UByte
subtract(UByte val)
BigInteger
toBigInteger()
Get this number as aBigInteger
.String
toString()
static UByte
valueOf(byte value)
Get an instance of anunsigned byte
by masking it with0xFF
i.e.static UByte
valueOf(int value)
Get an instance of anunsigned byte
static UByte
valueOf(long value)
Get an instance of anunsigned byte
static UByte
valueOf(short value)
Get an instance of anunsigned byte
static UByte
valueOf(String value)
Get an instance of anunsigned byte
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Field Detail
-
MIN_VALUE
public static final short MIN_VALUE
A constant holding the minimum value anunsigned byte
can have, 0.- See Also:
- Constant Field Values
-
MAX_VALUE
public static final short MAX_VALUE
A constant holding the maximum value anunsigned byte
can have, 28-1.- See Also:
- Constant Field Values
-
MIN
public static final UByte MIN
A constant holding the minimum value anunsigned byte
can have as UByte, 0.
-
MAX
public static final UByte MAX
A constant holding the maximum value anunsigned byte
can have as UByte, 28-1.
-
-
Method Detail
-
valueOf
public static UByte valueOf(String value) throws NumberFormatException
Get an instance of anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned byte
.
-
valueOf
public static UByte valueOf(byte value)
Get an instance of anunsigned byte
by masking it with0xFF
i.e.(byte) -1
becomes(ubyte) 255
-
valueOf
public static UByte valueOf(short value) throws NumberFormatException
Get an instance of anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
-
valueOf
public static UByte valueOf(int value) throws NumberFormatException
Get an instance of anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
-
valueOf
public static UByte valueOf(long value) throws NumberFormatException
Get an instance of anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classNumber
-
compareTo
public int compareTo(UByte o)
- Specified by:
compareTo
in interfaceComparable<UByte>
-
toBigInteger
public BigInteger toBigInteger()
Description copied from class:UNumber
Get this number as aBigInteger
. This is a convenience method for callingnew BigInteger(toString())
- Overrides:
toBigInteger
in classUNumber
-
add
public UByte add(UByte val) throws NumberFormatException
- Throws:
NumberFormatException
-
add
public UByte add(int val) throws NumberFormatException
- Throws:
NumberFormatException
-
subtract
public UByte subtract(int val)
-
-