Package dap4.dap4lib
Class LibTypeFcns
- java.lang.Object
-
- dap4.dap4lib.LibTypeFcns
-
public abstract class LibTypeFcns extends Object
This Class is used to isolate as many as possible of the switch statements using TypeSort enums. Singleton
-
-
Constructor Summary
Constructors Constructor Description LibTypeFcns()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
convertVector(DapType dsttype, DapType srctype, Object src)
Convert an array of one type of values to another typestatic Object
newVector(DapType type, long count)
static int
size(DapType type)
Conmpute the size, in databuffer, of the daptype wrt to a serialization; 0 if undefined.
-
-
-
Method Detail
-
size
public static int size(DapType type)
Conmpute the size, in databuffer, of the daptype wrt to a serialization; 0 if undefined.- Parameters:
type
- The type of interest- Returns:
- the size, in databuffer
-
newVector
public static Object newVector(DapType type, long count) throws DapException
- Throws:
DapException
-
convertVector
public static Object convertVector(DapType dsttype, DapType srctype, Object src) throws DapException
Convert an array of one type of values to another type- Parameters:
dsttype
- target typesrctype
- source typesrc
- array of values to convert- Returns:
- resulting array of converted values as an object
- Throws:
DapException
-
-