public class AssertExpression extends ExpressionOperation implements cascading.operation.ValueAssertion<ScriptOperation.Context>
Tuple
values. Any Tuple that
returns true for the given expression pass the assertion. This Assertion
is based on the Janino compiler.
Specifically this filter uses the ExpressionEvaluator
, thus the syntax from that class is inherited here.
An expression may use field names directly as parameters in the expression, or field positions with the syntax
"$n", where n is an integer.
Given an argument tuple with the fields "a" and "b", the following expression returns true: a + b == $0 + $1
ScriptOperation.Context
block, parameterNames, parameterTypes, returnType
Constructor and Description |
---|
AssertExpression(cascading.tuple.Fields fieldDeclaration,
java.lang.String expression,
java.lang.String[] parameterNames,
java.lang.Class[] parameterTypes)
Constructor AssertExpression creates a new AssertExpression instance.
|
AssertExpression(java.lang.String expression,
java.lang.Class parameterType)
Constructor ExpressionFilter creates a new ExpressionFilter instance.
|
Modifier and Type | Method and Description |
---|---|
void |
doAssert(cascading.flow.FlowProcess flowProcess,
cascading.operation.ValueAssertionCall<ScriptOperation.Context> assertionCall) |
boolean |
supportsPlannerLevel(cascading.operation.PlannerLevel plannerLevel) |
getEvaluator, getExpression, guessParameterNames
equals, evaluate, getBlock, getParameterNames, getParameterTypes, getReturnType, hashCode, prepare
cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal
@ConstructorProperties(value={"expression","parameterType"}) public AssertExpression(java.lang.String expression, java.lang.Class parameterType)
expression
- of type StringparameterType
- of type Class@ConstructorProperties(value={"fieldDeclaration","expression","parameterNames","parameterTypes"}) public AssertExpression(cascading.tuple.Fields fieldDeclaration, java.lang.String expression, java.lang.String[] parameterNames, java.lang.Class[] parameterTypes)
fieldDeclaration
- of type Fieldsexpression
- of type StringparameterNames
- of type String[]parameterTypes
- of type Class[]public boolean supportsPlannerLevel(cascading.operation.PlannerLevel plannerLevel)
supportsPlannerLevel
in interface cascading.operation.PlannedOperation<ScriptOperation.Context>
public void doAssert(cascading.flow.FlowProcess flowProcess, cascading.operation.ValueAssertionCall<ScriptOperation.Context> assertionCall)
doAssert
in interface cascading.operation.ValueAssertion<ScriptOperation.Context>
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.