Package net.hydromatic.morel.compile
Enum BuiltIn.Datatype
- All Implemented Interfaces:
Serializable,Comparable<BuiltIn.Datatype>,java.lang.constant.Constable,BuiltIn.BuiltInType
- Enclosing class:
BuiltIn
Built-in datatype.
order and option are non-internal.
The two internal datatypes,
datatype 'a list = NIL | CONS of ('a * 'a list);
datatype bool = FALSE | TRUE;
are not available from within programs but used for internal purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final Stringprivate final UnaryOperator<BuiltIn.DataTypeHelper> private final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDatatype(String mlName, boolean internal, int varCount, UnaryOperator<BuiltIn.DataTypeHelper> transform) -
Method Summary
Modifier and TypeMethodDescriptionbooleanmlName()static BuiltIn.DatatypeReturns the enum constant of this type with the specified name.static BuiltIn.Datatype[]values()Returns an array containing the constants of this enum type, in the order they are declared.intvarCount()
-
Enum Constant Details
-
ORDER
-
OPTION
-
LIST
Analog oflistfor checking that matches are exhaustive. Owns theNILandCONStype constructors. -
BOOL
Analog ofboolfor checking that matches are exhaustive. Owns theFALSEandTRUEtype constructors.
-
-
Field Details
-
mlName
-
internal
private final boolean internal -
varCount
private final int varCount -
transform
-
-
Constructor Details
-
Datatype
private Datatype(String mlName, boolean internal, int varCount, UnaryOperator<BuiltIn.DataTypeHelper> transform)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
mlName
- Specified by:
mlNamein interfaceBuiltIn.BuiltInType
-
varCount
public int varCount()- Specified by:
varCountin interfaceBuiltIn.BuiltInType
-
transform
- Specified by:
transformin interfaceBuiltIn.BuiltInType
-
isInternal
public boolean isInternal()- Specified by:
isInternalin interfaceBuiltIn.BuiltInType
-