Package dap4.dap4lib

Class 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 Detail

      • LibTypeFcns

        public LibTypeFcns()
    • 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
      • 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 type
        srctype - source type
        src - array of values to convert
        Returns:
        resulting array of converted values as an object
        Throws:
        DapException