public final class JIUnsignedFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
static IJIUnsigned |
getUnsigned(Number value,
int flag)
< p>
Returns an implementation for each of the
unsigned type. |
public static IJIUnsigned getUnsigned(Number value, int flag)
unsigned type.
Only 3 types are supported at present Byte,
Short, Integer.
Since Java has no support for unsigned types, use a Short
for a Byte, Integer for a Short
and Long for an Integer. This is to accomodate
the entire spectrum for the unsigned type and prevent the
rollover problem.
value - Short, Integer, Long
onlyflag - JIFlags unsigned flagsIllegalArgumentException - if the value is not an
instance of the supported types or an incorrect flag has
been provided.JIFlags.FLAG_REPRESENTATION_UNSIGNED_BYTE,
JIFlags.FLAG_REPRESENTATION_UNSIGNED_SHORT,
JIFlags.FLAG_REPRESENTATION_UNSIGNED_INTCopyright © 2022. All rights reserved.