Modifier and Type | Field and Description |
---|---|
protected DapType |
basetype |
protected java.util.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, URL
annotations, attributes, dataset, escapedname, fqn, index, parent, shortname, sort, xmlattributes
Constructor and Description |
---|
DapEnumeration(java.lang.String name) |
DapEnumeration(java.lang.String name,
DapType basetype) |
Modifier and Type | Method and Description |
---|---|
void |
addEnumConst(DapEnumConst dec) |
java.lang.String[] |
convert(long[] lvalues) |
java.lang.String[] |
convert(java.lang.String[] vec)
Convert a string vector of int strings mixed with econst names
to a set of longs only
|
DapNode |
findByName(java.lang.String name) |
DapType |
getBaseType() |
java.util.List<DapEnumConst> |
getEnumConsts() |
java.util.List<java.lang.String> |
getNames() |
DapEnumConst |
lookup(long value) |
DapEnumConst |
lookup(java.lang.String name) |
static boolean |
same(DapEnumeration enum1,
DapEnumeration enum2) |
void |
setBaseType(DapType basetype) |
void |
setEnumConsts(java.util.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, vectorget
addAttribute, 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, toString
public static final DapType DEFAULTBASETYPE
protected DapType basetype
protected java.util.List<DapEnumConst> constants
public DapEnumeration(java.lang.String name)
public DapEnumeration(java.lang.String name, DapType basetype)
public static boolean same(DapEnumeration enum1, DapEnumeration enum2)
public DapNode findByName(java.lang.String name)
public DapType getBaseType()
public java.util.List<DapEnumConst> getEnumConsts()
public void setBaseType(DapType basetype)
public void setEnumConsts(java.util.List<DapEnumConst> econsts) throws DapException
DapException
public void addEnumConst(DapEnumConst dec) throws DapException
DapException
public java.util.List<java.lang.String> getNames()
public DapEnumConst lookup(java.lang.String name)
public DapEnumConst lookup(long value)
public java.lang.String[] convert(java.lang.String[] vec) throws ConversionException
vec
- vector of int strings mixed with econst namesConversionException
public java.lang.String[] convert(long[] lvalues) throws ConversionException
ConversionException