Class CDMTypeFcns


  • public abstract class CDMTypeFcns
    extends Object
    This Class is used to isolate as many as possible of the switch statements using TypeSort enums (Or in somecase DapType.getTypeSort()) Singleton
    • Constructor Detail

      • CDMTypeFcns

        public CDMTypeFcns()
    • Method Detail

      • cdmElementClass

        public static Class cdmElementClass​(DataType dt)
      • createVector

        public static Object createVector​(DataType type,
                                          long count)
      • signify

        public static boolean signify​(DapType type)
      • createVector

        public static Object createVector​(DapType type,
                                          long count)
      • cdmtype2daptype

        public static DapType cdmtype2daptype​(DataType datatype)
      • daptype2cdmtype

        public static DataType daptype2cdmtype​(DapType type)
      • daptypeSize

        public static int daptypeSize​(TypeSort atomtype)
        Conmpute the size, in databuffer, of the daptype wrt to a serialization; 0 if undefined.
        Parameters:
        atomtype - The type of interest
        Returns:
        the size, in databuffer
      • extract

        public static long extract​(TypeSort sort,
                                   Object value)
      • attributeParse

        public static Object attributeParse​(DataType cdmtype,
                                            EnumTypedef en,
                                            Object o)
        convert a string to a specified cdmtype Note that if en is defined, then we attempt to convert the string as enum const
        Parameters:
        cdmtype -
        en -
        o -
        Returns:
        parsed attribute
      • isPrimitiveVector

        public static boolean isPrimitiveVector​(DataType type,
                                                Object o)
      • listify

        public static List listify​(Object vector)
      • bytesAsTypeVec

        public static Object bytesAsTypeVec​(DapType daptype,
                                            byte[] bytes)
      • decodebytes

        public static void decodebytes​(ByteOrder remoteorder,
                                       DapType daptype,
                                       byte[] bytes,
                                       Object vector)