public class NamedTuple extends Tuple
N.B.: the names in a named tuple may not be overloaded (i.e., the same name cannot appear more than once in a named tuple with distinct types.
VOID_ASSIGNMENTS| Constructor and Description |
|---|
NamedTuple(java.util.AbstractList components,
java.util.AbstractList names) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
copy()
Returns a deep copy of this expression.
|
TupleFieldName |
field(int n)
Returns the field name originally in the specified position; null
if position is not legal.
|
TupleFieldName[] |
fields() |
java.lang.String |
toString() |
void |
typeCheck(TypeChecker typeChecker)
This method type-checks this expression in the context of the specified
TypeChecker.
|
Expression |
typedCopy()
Returns a deep copy of this expression this and all its subexpressions share the
same type as their copy's counterparts.
|
compile, component, dimension, newTuple, numberOfSubexpressions, setCheckedType, setSubexpression, subexpressioncheckedType, setCheckedType, setType, type, typeRefaddType, addTypes, boxSort, containsFreeName, enclosingScope, extent, getEnd, getStart, isConstant, isEquality, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, shiftOffsets, shiftOffsets, sort, substitute, typeCheck, typeCheck, typeCheckLockedpublic NamedTuple(java.util.AbstractList components,
java.util.AbstractList names)
public final Expression copy()
Expressionpublic final Expression typedCopy()
Expressionpublic final TupleFieldName[] fields()
public final TupleFieldName field(int n)
public final void typeCheck(TypeChecker typeChecker) throws TypingErrorException
ExpressiontypeCheck in class TupleTypingErrorException