Package ucar.nc2
Class EnumTypedef
- java.lang.Object
-
- ucar.nc2.EnumTypedef
-
@Immutable public class EnumTypedef extends Object
A named map from integers to Strings; a user-defined Enum used as a Variable's data type. For ENUM1, ENUM2, ENUM4 enumeration types.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
boolean
equalsMapOnly(Object o)
Compare only the values in the map.ArrayType
getBaseArrayType()
One of ArrayType.ENUM1, ArrayType.ENUM2, or ArrayType.ENUM4.com.google.common.collect.ImmutableMap<Integer,String>
getMap()
The Map from integer to enum name.String
getShortName()
The EnumTypedef name.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()
-
-
-
Method Detail
-
getBaseArrayType
public ArrayType getBaseArrayType()
One of ArrayType.ENUM1, ArrayType.ENUM2, or ArrayType.ENUM4.
-
getShortName
public String getShortName()
The EnumTypedef name.
-
getMap
public com.google.common.collect.ImmutableMap<Integer,String> getMap()
The Map from integer to enum name.
-
lookupEnumInt
@Nullable public Integer lookupEnumInt(String name)
Get the enum value corresponding to the name.
-
lookupEnumString
@Nullable public String lookupEnumString(int e)
Get the name corresponding to the enum value.
-
equalsMapOnly
public boolean equalsMapOnly(Object o)
Compare only the values in the map. Needed for netCDF4 wierdness.
-
-