Pattern a = new Pattern( 0, ot, "$a" );
Pattern b = new Pattern( 1, ot, "$b" );
b.addConstraint( new VariableConstraint(
new SelfReferenceClassFieldReader( StockTick.class, "this" ),
new VariableRestriction( null, a.getDeclaration(), evals.getEvaluator( ValueType.OBJECT_TYPE,
AfterEvaluatorDefinition.AFTER,
"-2,2" ) ) ) );
Pattern c = new Pattern( 2, ot, "$c" );
c.addConstraint( new VariableConstraint(
new SelfReferenceClassFieldReader( StockTick.class, "this" ),
new VariableRestriction( null, a.getDeclaration(), evals.getEvaluator( ValueType.OBJECT_TYPE,
AfterEvaluatorDefinition.AFTER,
"-3,4" ) ) ) );
Pattern d = new Pattern( 3, ot, "$d" );
d.addConstraint( new VariableConstraint(
new SelfReferenceClassFieldReader( StockTick.class, "this" ),
new VariableRestriction( null, b.getDeclaration(), evals.getEvaluator( ValueType.OBJECT_TYPE,
AfterEvaluatorDefinition.AFTER,
"1,2" ) ) ) );
d.addConstraint( new VariableConstraint(
new SelfReferenceClassFieldReader( StockTick.class, "this" ),
new VariableRestriction( null, c.getDeclaration(), evals.getEvaluator( ValueType.OBJECT_TYPE,
AfterEvaluatorDefinition.AFTER,
"2,3" ) ) ) );
Pattern e = new Pattern( 4, ot, "$e" );
e.addConstraint( new VariableConstraint(
new SelfReferenceClassFieldReader( StockTick.class, "this" ),
new VariableRestriction( null, d.getDeclaration(), evals.getEvaluator( ValueType.OBJECT_TYPE,
AfterEvaluatorDefinition.AFTER,
"1,10" ) ) ) );
GroupElement not = new GroupElement( Type.NOT );
not.addChild( e );