Package net.hydromatic.morel.type
Class Keys.OrdinalKey
java.lang.Object
net.hydromatic.morel.type.Type.Key
net.hydromatic.morel.type.Keys.OrdinalKey
- Enclosing class:
Keys
Key that identifies a type by ordinal.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescribe(StringBuilder buf, int left, int right) Writes a description of this key to a string builder.booleaninthashCode()substitute(List<? extends Type> types) If this is a type variableordinal, returns theordinalth type in the list, otherwise this.toString()Returns a description of this key.toType(TypeSystem typeSystem) Converts this key to a type, and ensures that it is registered in the type system.
-
Field Details
-
ordinal
final int ordinal
-
-
Constructor Details
-
OrdinalKey
OrdinalKey(int ordinal)
-
-
Method Details
-
toString
Description copied from class:Type.KeyReturns a description of this key.The default implementation calls
Type.Key.describe(StringBuilder, int, int), but subclasses may override to provide a more efficient implementation. -
describe
Description copied from class:Type.KeyWrites a description of this key to a string builder. -
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
-
toType
Description copied from class:Type.KeyConverts this key to a type, and ensures that it is registered in the type system.
-