Package org.jooq.types
Class UByte
- java.lang.Object
-
- java.lang.Number
-
- org.jooq.types.UNumber
-
- org.jooq.types.UByte
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UByte>
public final class UByte extends UNumber implements java.lang.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(java.lang.Object obj)
float
floatValue()
int
hashCode()
int
intValue()
long
longValue()
UByte
subtract(int val)
UByte
subtract(UByte val)
java.math.BigInteger
toBigInteger()
Get this number as aBigInteger
.java.lang.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(java.lang.String value)
Get an instance of anunsigned byte
-
-
-
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(java.lang.String value) throws java.lang.NumberFormatException
Get an instance of anunsigned byte
- Throws:
java.lang.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 java.lang.NumberFormatException
Get an instance of anunsigned byte
- Throws:
java.lang.NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
-
valueOf
public static UByte valueOf(int value) throws java.lang.NumberFormatException
Get an instance of anunsigned byte
- Throws:
java.lang.NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
-
valueOf
public static UByte valueOf(long value) throws java.lang.NumberFormatException
Get an instance of anunsigned byte
- Throws:
java.lang.NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
-
intValue
public int intValue()
- Specified by:
intValue
in classjava.lang.Number
-
longValue
public long longValue()
- Specified by:
longValue
in classjava.lang.Number
-
floatValue
public float floatValue()
- Specified by:
floatValue
in classjava.lang.Number
-
doubleValue
public double doubleValue()
- Specified by:
doubleValue
in classjava.lang.Number
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(UByte o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<UByte>
-
toBigInteger
public java.math.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 java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
-
add
public UByte add(int val) throws java.lang.NumberFormatException
- Throws:
java.lang.NumberFormatException
-
subtract
public UByte subtract(int val)
-
-