public final class Unsigned
extends java.lang.Object
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
Modifier and Type | Method and Description |
---|---|
static UByte |
ubyte(byte value)
Create an
unsigned byte by masking it with 0xFF
i.e. |
static UByte |
ubyte(int value)
Create an
unsigned byte |
static UByte |
ubyte(long value)
Create an
unsigned byte |
static UByte |
ubyte(short value)
Create an
unsigned byte |
static UByte |
ubyte(java.lang.String value)
Create an
unsigned byte |
static UInteger |
uint(int value)
Create an
unsigned int by masking it with
0xFFFFFFFF i.e. |
static UInteger |
uint(long value)
Create an
unsigned int |
static UInteger |
uint(java.lang.String value)
Create an
unsigned int |
static ULong |
ulong(java.math.BigInteger value)
Create an
unsigned long |
static ULong |
ulong(long value)
Create an
unsigned long by masking it with
0xFFFFFFFFFFFFFFFF i.e. |
static ULong |
ulong(java.lang.String value)
Create an
unsigned long |
static UShort |
ushort(int value)
Create an
unsigned short |
static UShort |
ushort(short value)
Create an
unsigned short by masking it with
0xFFFF i.e. |
static UShort |
ushort(java.lang.String value)
Create an
unsigned short |
public static UByte ubyte(java.lang.String value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
does not contain a
parsable unsigned byte
.UByte.valueOf(String)
public static UByte ubyte(byte value)
unsigned byte
by masking it with 0xFF
i.e. (byte) -1
becomes (ubyte) 255
UByte.valueOf(byte)
public static UByte ubyte(short value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned byte
UByte.valueOf(short)
public static UByte ubyte(int value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned byte
UByte.valueOf(short)
public static UByte ubyte(long value) throws java.lang.NumberFormatException
unsigned byte
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned byte
UByte.valueOf(short)
public static UShort ushort(java.lang.String value) throws java.lang.NumberFormatException
unsigned short
java.lang.NumberFormatException
- If value
does not contain a
parsable unsigned short
.UShort.valueOf(String)
public static UShort ushort(short value)
unsigned short
by masking it with
0xFFFF
i.e. (short) -1
becomes
(ushort) 65535
UShort.valueOf(short)
public static UShort ushort(int value) throws java.lang.NumberFormatException
unsigned short
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned short
UShort.valueOf(int)
public static UInteger uint(java.lang.String value) throws java.lang.NumberFormatException
unsigned int
java.lang.NumberFormatException
- If value
does not contain a
parsable unsigned int
.UInteger.valueOf(String)
public static UInteger uint(int value)
unsigned int
by masking it with
0xFFFFFFFF
i.e. (int) -1
becomes
(uint) 4294967295
UInteger.valueOf(int)
public static UInteger uint(long value) throws java.lang.NumberFormatException
unsigned int
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned int
UInteger.valueOf(long)
public static ULong ulong(java.lang.String value) throws java.lang.NumberFormatException
unsigned long
java.lang.NumberFormatException
- If value
does not contain a
parsable unsigned long
.ULong.valueOf(String)
public static ULong ulong(long value)
unsigned long
by masking it with
0xFFFFFFFFFFFFFFFF
i.e. (long) -1
becomes
(uint) 18446744073709551615
ULong.valueOf(long)
public static ULong ulong(java.math.BigInteger value) throws java.lang.NumberFormatException
unsigned long
java.lang.NumberFormatException
- If value
is not in the range
of an unsigned long
ULong.valueOf(BigInteger)
Copyright © 2018. All Rights Reserved.