TypeLentMap

1810阅读 0评论2016-01-18 fangdikui
分类:Java

package com.dd.model.protocol;


import java.util.HashMap;


public class TypeLentMap
{
private static HashMap  mapTable = new HashMap();
public TypeLentMap()
{
mapTable.put(DataTypeEnum.BOOL, 1);
mapTable.put(DataTypeEnum.INT8, 1);
mapTable.put(DataTypeEnum.INT16, 2);
mapTable.put(DataTypeEnum.INT32, 4);
mapTable.put(DataTypeEnum.FLOAT, 4);
mapTable.put(DataTypeEnum.BOOL, 1);
mapTable.put(DataTypeEnum.BOOL, 1);
mapTable.put(DataTypeEnum.BOOL, 1);

}
public static int getByteWidthByType(DataTypeEnum type)
{
return mapTable.get(type).intValue();
}


}

上一篇:TTLDecoder
下一篇:Value