Package cascading.pattern.model.tree.predicate

Examples of cascading.pattern.model.tree.predicate.EqualsToPredicate


      Type expectedFieldType = expectedField.getType();

      switch( operator )
        {
        case EQUAL:
          return new EqualsToPredicate( fieldName, Coercions.coerce( value, expectedFieldType ) );
        case NOT_EQUAL:
          return new NotEqualsToPredicate( fieldName, Coercions.coerce( value, expectedFieldType ) );
        case LESS_THAN:
          return new LessThanPredicate( fieldName, (Comparable) Coercions.coerce( value, expectedFieldType ) );
        case LESS_OR_EQUAL:
View Full Code Here


    }

  @Test
  public void testAnd()
    {
    Predicate andPredicate = new AndPredicate( new IsNotMissingPredicate( "var0" ), new EqualsToPredicate( "var1", "value" ) );

    assertTrue( new PredicateEvaluator( expectedFields, andPredicate ).evaluate( tupleEntry ) );
    }
View Full Code Here

    }

  @Test
  public void testOr()
    {
    Predicate orPredicate = new AndPredicate( new IsNotMissingPredicate( "var2" ), new EqualsToPredicate( "var1", "value" ) );

    assertTrue( !new PredicateEvaluator( expectedFields, orPredicate ).evaluate( tupleEntry ) );
    }
View Full Code Here

  @Test
  public void testComplex()
    {
    Predicate complexPredicate = new AndPredicate(
      new IsNotMissingPredicate( "var0" ),
      new OrPredicate( new EqualsToPredicate( "var1", "value" ), new IsMissingPredicate( "var2" ) ) );

    assertTrue( new PredicateEvaluator( expectedFields, complexPredicate ).evaluate( tupleEntry ) );
    }
View Full Code Here

  @Test
  public void testSurrogate()
    {
    Predicate surrogatePredicate = new SurrogatePredicate(
      new EqualsToPredicate( "var2", 0.0d ),
      new EqualsToPredicate( "var2", 0.0d ),
      new TruePredicate() );

    assertTrue( new PredicateEvaluator( expectedFields, surrogatePredicate ).evaluate( tupleEntry ) );
    }
View Full Code Here

TOP

Related Classes of cascading.pattern.model.tree.predicate.EqualsToPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.