Package org.jooq.types
Class UInteger
- java.lang.Object
-
- java.lang.Number
-
- org.jooq.types.UNumber
-
- org.jooq.types.UInteger
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<UInteger>
public final class UInteger extends UNumber implements java.lang.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(java.lang.Object obj)
float
floatValue()
int
hashCode()
int
intValue()
long
longValue()
UInteger
subtract(int val)
UInteger
subtract(UInteger val)
java.math.BigInteger
toBigInteger()
Get this number as aBigInteger
.java.lang.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(java.lang.String value)
Create anunsigned int
-
-
-
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(java.lang.String value) throws java.lang.NumberFormatException
Create anunsigned int
- Throws:
java.lang.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 java.lang.NumberFormatException
Create anunsigned int
- 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
-
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
-
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(UInteger o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<UInteger>
-
add
public UInteger add(int val)
-
subtract
public UInteger subtract(int val)
-
-