public class NamedTupleType extends TupleType
| Constructor and Description |
|---|
NamedTupleType(java.util.AbstractList components,
java.util.AbstractList names) |
NamedTupleType(Type[] components,
TupleFieldName[] fields)
This trusts the component types to be non void.
|
| Modifier and Type | Method and Description |
|---|---|
Type |
copy(java.util.HashMap parameters)
Returns a copy of this type with a consistent renaming of all free type
parameters, and identyfing bound type parameters with their values.
|
TupleFieldName |
field(int n)
Returns the field name originally in the specified position; null
if position is not legal.
|
int |
fieldPosition(int n)
Returns the position of the field whose original index is n-1.
|
TupleFieldName[] |
fields() |
java.lang.String |
fieldSet() |
int[] |
index() |
boolean |
isEqualTo(Type type)
Returns true iff this type is structurally isomorphic to the specified type.
|
boolean |
isEqualTo(Type type,
java.util.HashMap parameters)
Returns true iff this type is structurally isomorphic to the
specified type, under the renaming of type parameters specified
by the given HashMap.
|
byte |
kind()
This returns the value identifying what kind of type this is.
|
int |
position(java.lang.String name)
Returns the position of the field whose name is name.
|
java.lang.String |
toString() |
boolean |
unify(Type type)
This unifies this type with the specified type with no possibility of undoing any
effects.
|
void |
unify(Type type,
TypeChecker typeChecker)
This unifies this type with the specified type in the context
of the specified TypeChecker.
|
checkOccurrence, component, components, dimension, eqCode, flatten, getParameters, instantiate, newTupleType, newTupleType, numberOfTypeComponents, setTypeRefComponent, typeRefComponentactualType, array, array, baseType, baseTypeRef, BOOLEAN, BOXED_BOOLEAN, BOXED_CHAR, BOXED_INT, BOXED_REAL, boxSort, CHAR, copy, curry, equals, findValue, getParameters, getValue, INT, is, isBag, isBoolean, isBoxedType, isChar, isCollection, isGlobalUnsafe, isInt, isList, isPolymorphic, isPrimitive, isReal, isSet, isString, isVoid, kindString, rank, REAL, resetNames, setBoxed, shadowType, sort, standardize, toFullString, toQuantifiedString, toQuantifiedString, typeComponent, unwrapper, value, wrapperpublic NamedTupleType(Type[] components, TupleFieldName[] fields)
public NamedTupleType(java.util.AbstractList components,
java.util.AbstractList names)
public final TupleFieldName[] fields()
public final int[] index()
public final java.lang.String fieldSet()
public final int position(java.lang.String name)
public final TupleFieldName field(int n)
public final int fieldPosition(int n)
public final byte kind()
Typepublic final void unify(Type type, TypeChecker typeChecker) throws FailedUnificationException
Typeunify in class TupleTypeFailedUnificationExceptionpublic boolean unify(Type type)
Typepublic final Type copy(java.util.HashMap parameters)
TypeN.B.: The following definition specifies only the default behavior for this method. Specific subclasses are generally expected to override this method.
public final boolean isEqualTo(Type type)
Typepublic final boolean isEqualTo(Type type, java.util.HashMap parameters)
Type