@Immutable
public class EnumTypedef
extends ucar.nc2.CDMNode
Constructor and Description |
---|
EnumTypedef(java.lang.String name,
java.util.Map<java.lang.Integer,java.lang.String> map)
Make an EnumTypedef with base type ENUM4.
|
EnumTypedef(java.lang.String name,
java.util.Map<java.lang.Integer,java.lang.String> map,
DataType basetype)
Make an EnumTypedef setting the base type (must be ENUM1, ENUM2, ENUM4).
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
boolean |
equalsMapOnly(java.lang.Object o) |
DataType |
getBaseType()
One of DataType.ENUM1, DataType.ENUM2, or DataType.ENUM4.
|
com.google.common.collect.ImmutableMap<java.lang.Integer,java.lang.String> |
getMap() |
int |
hashCode() |
java.lang.Integer |
lookupEnumInt(java.lang.String name)
Get the enum value corresponding to the name.
|
java.lang.String |
lookupEnumString(int e)
Get the name corresponding to the enum value.
|
java.lang.String |
toString() |
public EnumTypedef(java.lang.String name, java.util.Map<java.lang.Integer,java.lang.String> map)
public EnumTypedef(java.lang.String name, java.util.Map<java.lang.Integer,java.lang.String> map, DataType basetype)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equalsMapOnly(java.lang.Object o)
public DataType getBaseType()
public com.google.common.collect.ImmutableMap<java.lang.Integer,java.lang.String> getMap()
public int hashCode()
hashCode
in class java.lang.Object
@Nullable public java.lang.Integer lookupEnumInt(java.lang.String name)
@Nullable public java.lang.String lookupEnumString(int e)
public java.lang.String toString()
toString
in class java.lang.Object