Package net.hydromatic.morel.type
Class TupleType
java.lang.Object
net.hydromatic.morel.type.BaseType
net.hydromatic.morel.type.TupleType
- All Implemented Interfaces:
RecordLikeType,Type
The type of a tuple value.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(TypeVisitor<R> typeVisitor) argType(int i) Returns the type of theith field, or throws.copy(TypeSystem typeSystem, UnaryOperator<Type> transform) Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.key()Description of the type, e.g.ordinalNames(int size) Returns a list of strings ["1", ..., "size"].(package private) static <E> com.google.common.collect.ImmutableSortedMap<String, E> Given a list of types [t1, t2, ..., tn] returns a sorted map ["1" : t1, "2" : t2, ...private static Stringstr(int i) Converts an integer to its string representation, using a cached value if possible.toArgNameTypeKeys(List<? extends Type> argTypes) Given a list of types [t1, t2, ..., tn] returns a sorted map ["1" : t1.key, "2" : t2.key, ...Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.hydromatic.morel.type.RecordLikeType
asTypedValueMethods inherited from interface net.hydromatic.morel.type.Type
isProgressive, moniker, op, substitute
-
Field Details
-
INT_STRINGS
-
argTypes
-
-
Constructor Details
-
TupleType
-
-
Method Details
-
argNameTypes
- Specified by:
argNameTypesin interfaceRecordLikeType
-
argType
Description copied from interface:RecordLikeTypeReturns the type of theith field, or throws.- Specified by:
argTypein interfaceRecordLikeType
-
accept
-
key
Description copied from interface:TypeDescription of the type, e.g. "int", "int -> int", "NONE | SOME of 'a". -
copy
Description copied from interface:TypeCopies this type, applying a given transform to component types, and returning the original type if the component types are unchanged. -
str
Converts an integer to its string representation, using a cached value if possible. -
ordinalNames
Returns a list of strings ["1", ..., "size"]. -
recordMap
static <E> com.google.common.collect.ImmutableSortedMap<String,E> recordMap(List<? extends E> argTypes) Given a list of types [t1, t2, ..., tn] returns a sorted map ["1" : t1, "2" : t2, ... "n" : tn]. -
toArgNameTypeKeys
static com.google.common.collect.ImmutableSortedMap<String,Type.Key> toArgNameTypeKeys(List<? extends Type> argTypes) Given a list of types [t1, t2, ..., tn] returns a sorted map ["1" : t1.key, "2" : t2.key, ... "n" : tn.key].
-