Package ucar.nc2
Class EnumTypedef
- java.lang.Object
-
- ucar.nc2.CDMNode
-
- ucar.nc2.EnumTypedef
-
@Immutable public class EnumTypedef extends CDMNode
A named map from integers to Strings; a user-defined Enum used as a Variable's data type. For ENUM1, ENUM2, ENUM4 enumeration types. Immutable. TODO EnumTypedef will not extend CDMNode in 6. TODO EnumTypedef will not have a reference to its owning Group in 6. TODO EnumTypedef.getFullName() will not exist in 6.
-
-
Field Summary
-
Fields inherited from class ucar.nc2.CDMNode
annotations, dodsname, group, immutable, parentstruct, shortName, sort
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object o)booleanequalsMapOnly(Object o)DataTypegetBaseType()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()inthashCode()IntegerlookupEnumInt(String name)Get the enum value corresponding to the name.StringlookupEnumString(int e)Get the name corresponding to the enum value.StringtoString()StringwriteCDL(boolean strict)Deprecated.use CDLWriterprotected voidwriteCDL(Formatter out, Indent indent, boolean strict)Deprecated.use CDLWriter-
Methods inherited from class ucar.nc2.CDMNode
annotate, annotation, getDODSName, getFullName, getFullNameEscaped, getGroup, getImmutable, getName, getParentGroup, getParentStructure, getShortName, getSort, isMemberOfStructure, localhash, setDODSName, setImmutable, setParentGroup, setParentStructure, setShortName, setSort, unwrap
-
-
-
-
Method Detail
-
getEnumStrings
@Deprecated public com.google.common.collect.ImmutableList<String> getEnumStrings()
Deprecated.use getMap()
-
getBaseType
public DataType getBaseType()
One of DataType.ENUM1, DataType.ENUM2, or DataType.ENUM4.
-
lookupEnumString
@Nullable public String lookupEnumString(int e)
Get the name corresponding to the enum value.
-
lookupEnumInt
@Nullable public Integer lookupEnumInt(String name)
Get the enum value corresponding to the name.
-
writeCDL
@Deprecated public String writeCDL(boolean strict)
Deprecated.use CDLWriterCDL string representation.- Parameters:
strict- if true, write in strict adherence to CDL definition.- Returns:
- CDL representation.
-
writeCDL
@Deprecated protected void writeCDL(Formatter out, Indent indent, boolean strict)
Deprecated.use CDLWriter
-
equalsMapOnly
public boolean equalsMapOnly(Object o)
-
-