- java.lang.Object
-
- java.lang.Number
-
- org.jooq.types.UNumber
-
- org.jooq.types.UInteger
-
- All Implemented Interfaces:
Serializable
,Comparable<UInteger>
public final class UInteger extends UNumber implements Comparable<UInteger>
Theunsigned int
type- Author:
- Lukas Eder, Ed Schaller, Jens Nerche
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UInteger
MAX
A constant holding the maximum value anunsigned int
can have as UInteger, 232-1.static long
MAX_VALUE
A constant holding the maximum value anunsigned int
can have, 232-1.static UInteger
MIN
A constant holding the minimum value anunsigned int
can have as UInteger, 0.static long
MIN_VALUE
A constant holding the minimum value anunsigned int
can have, 0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UInteger
add(int val)
UInteger
add(UInteger val)
int
compareTo(UInteger o)
double
doubleValue()
boolean
equals(Object obj)
float
floatValue()
int
hashCode()
int
intValue()
long
longValue()
UInteger
subtract(int val)
UInteger
subtract(UInteger val)
BigInteger
toBigInteger()
Get this number as aBigInteger
.String
toString()
static UInteger
valueOf(int value)
Create anunsigned int
by masking it with0xFFFFFFFF
i.e.static UInteger
valueOf(long value)
Create anunsigned int
static UInteger
valueOf(String value)
Create anunsigned int
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Field Detail
-
MIN_VALUE
public static final long MIN_VALUE
A constant holding the minimum value anunsigned int
can have, 0.- See Also:
- Constant Field Values
-
MAX_VALUE
public static final long MAX_VALUE
A constant holding the maximum value anunsigned int
can have, 232-1.- See Also:
- Constant Field Values
-
MIN
public static final UInteger MIN
A constant holding the minimum value anunsigned int
can have as UInteger, 0.
-
MAX
public static final UInteger MAX
A constant holding the maximum value anunsigned int
can have as UInteger, 232-1.
-
-
Method Detail
-
valueOf
public static UInteger valueOf(String value) throws NumberFormatException
Create anunsigned int
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned int
.
-
valueOf
public static UInteger valueOf(int value)
Create anunsigned int
by masking it with0xFFFFFFFF
i.e.(int) -1
becomes(uint) 4294967295
-
valueOf
public static UInteger valueOf(long value) throws NumberFormatException
Create anunsigned int
- 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
-
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
-
compareTo
public int compareTo(UInteger o)
- Specified by:
compareTo
in interfaceComparable<UInteger>
-
add
public UInteger add(int val)
-
subtract
public UInteger subtract(int val)
-
-