Class MappingExpressionImpl
java.lang.Object
se.liu.ida.hefquin.mappings.algebra.exprs.MappingExpressionImpl
- All Implemented Interfaces:
MappingExpression
This is an abstract base class for classes that implement the
MappingExpression interface. This base class implements
MappingExpression.getID().-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final MappingOperatorprotected final List<MappingExpression> protected final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMappingExpressionImpl(boolean valid, Set<String> schema, MappingOperator rootOp, MappingExpression... subExprs) UseMappingExpressionFactoryinstead. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetID()Returns an identifier of this mapping expression, which should be distinct from the identifiers of all other sub-expressions within the same expression.Returns the root operator of this expression.Returns the schema of the mapping relation that will be the result of evaluating this mapping expression.getSubExpression(int i) Returns the i-th sub-expression of this expression, where i starts at index 0 (zero).inthashCode()booleanisValid()Returnstrueif this mapping expression is valid.intReturns the number of sub-expressions that this expression has (considering sub-expressions that are direct children of the root operator of this expressions).Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.mappings.algebra.exprs.MappingExpression
isSameExpression
-
Field Details
-
id
protected final int id -
valid
protected final boolean valid -
schema
-
rootOp
-
subExprs
-
-
Constructor Details
-
MappingExpressionImpl
protected MappingExpressionImpl(boolean valid, Set<String> schema, MappingOperator rootOp, MappingExpression... subExprs) UseMappingExpressionFactoryinstead.
-
-
Method Details
-
getID
public int getID()Description copied from interface:MappingExpressionReturns an identifier of this mapping expression, which should be distinct from the identifiers of all other sub-expressions within the same expression.- Specified by:
getIDin interfaceMappingExpression
-
isValid
public boolean isValid()Description copied from interface:MappingExpressionReturnstrueif this mapping expression is valid.- Specified by:
isValidin interfaceMappingExpression
-
getSchema
Description copied from interface:MappingExpressionReturns the schema of the mapping relation that will be the result of evaluating this mapping expression.- Specified by:
getSchemain interfaceMappingExpression
-
getRootOperator
Description copied from interface:MappingExpressionReturns the root operator of this expression.- Specified by:
getRootOperatorin interfaceMappingExpression
-
numberOfSubExpressions
public int numberOfSubExpressions()Description copied from interface:MappingExpressionReturns the number of sub-expressions that this expression has (considering sub-expressions that are direct children of the root operator of this expressions).- Specified by:
numberOfSubExpressionsin interfaceMappingExpression
-
getSubExpression
Description copied from interface:MappingExpressionReturns the i-th sub-expression of this expression, where i starts at index 0 (zero). If the expression has fewer sub-expressions (or no sub-expressions at all), then anIndexOutOfBoundsExceptionwill be thrown.- Specified by:
getSubExpressionin interfaceMappingExpression
-
equals
-
hashCode
-