| Modifier and Type | Field and Description |
|---|---|
protected DapType |
basetype |
protected List<DapEnumConst> |
constants
The enumeration constants are represented by
a List of names since order is important at least for printing,
and a pair of maps.
|
static DapType |
DEFAULTBASETYPE |
CHAR, FLOAT32, FLOAT64, INT16, INT32, INT64, INT8, OPAQUE, pseudoroot, SEQUENCE, STRING, STRUCTURE, typesort, UINT16, UINT32, UINT64, UINT8, URLannotations, attributes, dataset, escapedname, fqn, index, parent, shortname, sort, xmlattributes| Constructor and Description |
|---|
DapEnumeration(String name) |
DapEnumeration(String name,
DapType basetype) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEnumConst(DapEnumConst dec) |
String[] |
convert(long[] lvalues) |
String[] |
convert(String[] vec)
Convert a string vector of int strings mixed with econst names
to a set of longs only
|
DapNode |
findByName(String name) |
DapType |
getBaseType() |
List<String> |
getNames() |
DapEnumConst |
lookup(long value) |
DapEnumConst |
lookup(String name) |
void |
setBaseType(DapType basetype) |
void |
setEnumConsts(List<DapEnumConst> econsts) |
getAtomicType, getSize, getTypeName, getTypeSort, isAtomic, isCharType, isCompound, isCompoundType, isEnumType, isFixedSize, isFloatType, isIntegerType, isLegalAttrType, isNumericType, isOpaqueType, isSeqType, isStringType, isStructType, isUnsigned, lookup, setTypeSort, vector, vectorgetaddAttribute, addXMLAttribute, annotate, annotation, computefqn, findAttribute, getAttributes, getContainer, getContainerPath, getDataset, getEscapedShortName, getFQN, getGroup, getGroupPath, getIndex, getParent, getPath, getShortName, getSort, getXMLAttributes, isTopLevel, overrideParent, removeAttribute, removeXMLAttribute, setAttribute, setAttributes, setDataset, setIndex, setParent, setShortName, setSort, toStringpublic static final DapType DEFAULTBASETYPE
protected DapType basetype
protected List<DapEnumConst> constants
public DapEnumeration(String name)
public DapType getBaseType()
public void setBaseType(DapType basetype)
public void setEnumConsts(List<DapEnumConst> econsts) throws DapException
DapExceptionpublic void addEnumConst(DapEnumConst dec) throws DapException
DapExceptionpublic DapEnumConst lookup(String name)
public DapEnumConst lookup(long value)
public String[] convert(String[] vec) throws ConversionException
vec - vector of int strings mixed with econst namesConversionExceptionpublic String[] convert(long[] lvalues) throws ConversionException
ConversionException