Package net.hydromatic.morel.type
Class Keys.DataTypeKey
java.lang.Object
net.hydromatic.morel.type.Type.Key
net.hydromatic.morel.type.Keys.DataTypeKey
- Enclosing class:
Keys
Key that identifies a
datatype scheme.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataTypeKey(String name, com.google.common.collect.ImmutableList<Type.Key> arguments, com.google.common.collect.ImmutableMap<String, Type.Key> typeConstructors) -
Method Summary
Modifier and TypeMethodDescriptiondescribe(StringBuilder buf, int left, int right) Writes a description of this key to a string builder.booleaninthashCode()(package private) Type.Keysubstitute(List<? extends Type> types) If this is a type variableordinal, returns theordinalth type in the list, otherwise this.toType(TypeSystem typeSystem) Converts this key to a type, and ensures that it is registered in the type system.
-
Field Details
-
name
Ideally, a datatype would not have a name, just a list of named type constructors, and the name would be associated later. When that happens, we can remove thenamefield from this key. -
arguments
-
typeConstructors
-
-
Constructor Details
-
DataTypeKey
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
substitute
Description copied from class:Type.KeyIf this is a type variableordinal, returns theordinalth type in the list, otherwise this.- Overrides:
substitutein classType.Key
-
describe
Writes a description of this key to a string builder.Prints the name of this datatype along with any type arguments. Examples:
order'a option(int * int) optionbool option option('a,'b) tree
-
toType
Description copied from class:Type.KeyConverts this key to a type, and ensures that it is registered in the type system.
-