@Immutable public class EnumTypedef extends CDMNode
annotations, dodsname, group, immutable, parentstruct, shortName, sort
Constructor and Description |
---|
EnumTypedef(String name,
Map<Integer,String> map)
Make an EnumTypedef with base type ENUM4.
|
EnumTypedef(String name,
Map<Integer,String> map,
DataType basetype)
Make an EnumTypedef setting the base type (must be ENUM1, ENUM2, ENUM4).
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
boolean |
equalsMapOnly(Object o) |
DataType |
getBaseType()
One of DataType.ENUM1, DataType.ENUM2, or DataType.ENUM4.
|
com.google.common.collect.ImmutableList<String> |
getEnumStrings()
Deprecated.
use getMap()
|
com.google.common.collect.ImmutableMap<Integer,String> |
getMap() |
int |
hashCode() |
Integer |
lookupEnumInt(String name)
Get the enum value corresponding to the name.
|
String |
lookupEnumString(int e)
Get the name corresponding to the enum value.
|
String |
toString() |
String |
writeCDL(boolean strict)
Deprecated.
use CDLWriter
|
protected void |
writeCDL(Formatter out,
Indent indent,
boolean strict)
Deprecated.
use CDLWriter
|
annotate, annotation, getDODSName, getFullName, getFullNameEscaped, getGroup, getImmutable, getName, getParentGroup, getParentStructure, getShortName, getSort, isMemberOfStructure, localhash, setDODSName, setImmutable, setParentGroup, setParentStructure, setShortName, setSort, unwrap
public EnumTypedef(String name, Map<Integer,String> map)
@Deprecated public com.google.common.collect.ImmutableList<String> getEnumStrings()
public DataType getBaseType()
@Nullable public String lookupEnumString(int e)
@Nullable public Integer lookupEnumInt(String name)
@Deprecated public String writeCDL(boolean strict)
strict
- if true, write in strict adherence to CDL definition.@Deprecated protected void writeCDL(Formatter out, Indent indent, boolean strict)
public boolean equalsMapOnly(Object o)