lava.array
Class SignedArrayCaster
java.lang.Object
|
+--lava.array.ArrayCaster
|
+--lava.array.SignedArrayCaster
- public abstract class SignedArrayCaster
- extends ArrayCaster
Casts arrays of signed primitives.
Details: SignedArrayCaster
is a collection of functions that cast arrays of signed primitives from one type to another using standard Lava primitive widening and narrowing conventions. In particular, alternate provisions for some of the less intuitive Java widening and narrowing conventions are presented here. For casting operations involving unsigned types, use UnsignedArrayCaster
. For casting operations where the default Java casting behavior is acceptable, use ArrayCaster
.
The signatures for functions in this class follow the same rules as described in ArrayCaster
.
- Version:
- 1999.09.11
- Author:
- Sharky
- See Also:
ArrayCaster
,
UnsignedArrayCaster
Method Summary |
static byte[] |
toBytes(double[] src,
int from,
byte[] dest,
int to,
int amt)
|
static byte[] |
toBytes(float[] src,
int from,
byte[] dest,
int to,
int amt)
|
static short[] |
toShorts(double[] src,
int from,
short[] dest,
int to,
int amt)
|
static short[] |
toShorts(float[] src,
int from,
short[] dest,
int to,
int amt)
|
Methods inherited from class lava.array.ArrayCaster |
getPrimitiveElementType,
toBytes,
toBytes,
toBytes,
toBytes,
toChars,
toChars,
toChars,
toChars,
toChars,
toChars,
toDoubles,
toDoubles,
toDoubles,
toDoubles,
toDoubles,
toDoubles,
toFloats,
toFloats,
toFloats,
toFloats,
toFloats,
toFloats,
toInts,
toInts,
toInts,
toInts,
toInts,
toInts,
toLongs,
toLongs,
toLongs,
toLongs,
toLongs,
toLongs,
toShorts,
toShorts,
toShorts,
toShorts |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SignedArrayCaster
public SignedArrayCaster()
toShorts
public static short[] toShorts(double[] src,
int from,
short[] dest,
int to,
int amt)
toShorts
public static short[] toShorts(float[] src,
int from,
short[] dest,
int to,
int amt)
toBytes
public static byte[] toBytes(double[] src,
int from,
byte[] dest,
int to,
int amt)
toBytes
public static byte[] toBytes(float[] src,
int from,
byte[] dest,
int to,
int amt)