java.lang.Objectorg.objectweb.telosys.util.Conv
Utility class for types conversions ( set of static methods )
Primitive types conversion with MIN/MAX values management
Field Summary | |
static boolean |
CUT
|
static boolean |
STRICT
|
Method Summary | |
static byte |
toByte(long l)
Converts to byte strictly ( throws a TelosysRuntimeException if lower/greater than MIN/MAX ) |
static byte |
toByte(long l,
boolean b)
Converts to byte ( STRICT or CUT mode ) |
static char |
toChar(long l)
Converts to char strictly ( throws a TelosysRuntimeException if lower/greater than MIN/MAX ) |
static char |
toChar(long l,
boolean b)
Converts to char ( STRICT or CUT mode ) |
static int |
toInt(long l)
Converts to int strictly ( throws a TelosysRuntimeException if lower/greater than MIN/MAX ) |
static int |
toInt(long l,
boolean b)
Converts to int ( STRICT or CUT mode ) |
static short |
toShort(long l)
Converts to short strictly ( throws a TelosysRuntimeException if lower/greater than MIN/MAX ) |
static short |
toShort(long l,
boolean b)
Converts to short ( STRICT or CUT mode ) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean STRICT
public static final boolean CUT
Method Detail |
public static char toChar(long l)
l
- : value to convert
public static char toChar(long l, boolean b)
l
- : value to convertb
- : mode :public static byte toByte(long l)
l
- : value to convert
public static byte toByte(long l, boolean b)
l
- : value to convertb
- : mode :public static short toShort(long l)
l
- : value to convert
public static short toShort(long l, boolean b)
l
- : value to convertb
- : mode :public static int toInt(long l)
l
- : value to convert
public static int toInt(long l, boolean b)
l
- : value to convertb
- : mode :