public final class JIUnsignedFactory extends Object
| Constructor and Description |
|---|
JIUnsignedFactory() |
| Modifier and Type | Method and Description |
|---|---|
static IJIUnsigned |
getUnsigned(Number value,
int flag)
Returns an implementation for each of the
unsigned type. |
public static IJIUnsigned getUnsigned(Number value, int flag)
Returns an implementation for each of the 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 © 2017 LSST. All rights reserved.