- java.lang.Object
-
- org.jooq.types.Unsigned
-
public final class Unsigned extends Object
A utility class for static access to unsigned number functionality.It essentially contains factory methods for unsigned number wrappers. In future versions, it will also contain some arithmetic methods, handling regular arithmetic and bitwise operations
- Author:
- Lukas Eder
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UByte
ubyte(byte value)
Create anunsigned byte
by masking it with0xFF
i.e.static UByte
ubyte(int value)
Create anunsigned byte
static UByte
ubyte(long value)
Create anunsigned byte
static UByte
ubyte(short value)
Create anunsigned byte
static UByte
ubyte(String value)
Create anunsigned byte
static UInteger
uint(int value)
Create anunsigned int
by masking it with0xFFFFFFFF
i.e.static UInteger
uint(long value)
Create anunsigned int
static UInteger
uint(String value)
Create anunsigned int
static ULong
ulong(long value)
Create anunsigned long
by masking it with0xFFFFFFFFFFFFFFFF
i.e.static ULong
ulong(String value)
Create anunsigned long
static ULong
ulong(BigInteger value)
Create anunsigned long
static UShort
ushort(int value)
Create anunsigned short
static UShort
ushort(short value)
Create anunsigned short
by masking it with0xFFFF
i.e.static UShort
ushort(String value)
Create anunsigned short
-
-
-
Method Detail
-
ubyte
public static UByte ubyte(String value) throws NumberFormatException
Create anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned byte
.- See Also:
UByte.valueOf(String)
-
ubyte
public static UByte ubyte(byte value)
Create anunsigned byte
by masking it with0xFF
i.e.(byte) -1
becomes(ubyte) 255
- See Also:
UByte.valueOf(byte)
-
ubyte
public static UByte ubyte(short value) throws NumberFormatException
Create anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
- See Also:
UByte.valueOf(short)
-
ubyte
public static UByte ubyte(int value) throws NumberFormatException
Create anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
- See Also:
UByte.valueOf(short)
-
ubyte
public static UByte ubyte(long value) throws NumberFormatException
Create anunsigned byte
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned byte
- See Also:
UByte.valueOf(short)
-
ushort
public static UShort ushort(String value) throws NumberFormatException
Create anunsigned short
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned short
.- See Also:
UShort.valueOf(String)
-
ushort
public static UShort ushort(short value)
Create anunsigned short
by masking it with0xFFFF
i.e.(short) -1
becomes(ushort) 65535
- See Also:
UShort.valueOf(short)
-
ushort
public static UShort ushort(int value) throws NumberFormatException
Create anunsigned short
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned short
- See Also:
UShort.valueOf(int)
-
uint
public static UInteger uint(String value) throws NumberFormatException
Create anunsigned int
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned int
.- See Also:
UInteger.valueOf(String)
-
uint
public static UInteger uint(int value)
Create anunsigned int
by masking it with0xFFFFFFFF
i.e.(int) -1
becomes(uint) 4294967295
- See Also:
UInteger.valueOf(int)
-
uint
public static UInteger uint(long value) throws NumberFormatException
Create anunsigned int
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned int
- See Also:
UInteger.valueOf(long)
-
ulong
public static ULong ulong(String value) throws NumberFormatException
Create anunsigned long
- Throws:
NumberFormatException
- Ifvalue
does not contain a parsableunsigned long
.- See Also:
ULong.valueOf(String)
-
ulong
public static ULong ulong(long value)
Create anunsigned long
by masking it with0xFFFFFFFFFFFFFFFF
i.e.(long) -1
becomes(uint) 18446744073709551615
- See Also:
ULong.valueOf(long)
-
ulong
public static ULong ulong(BigInteger value) throws NumberFormatException
Create anunsigned long
- Throws:
NumberFormatException
- Ifvalue
is not in the range of anunsigned long
- See Also:
ULong.valueOf(BigInteger)
-
-