Examples of evaluate()


Examples of org.apache.imperius.spl.parser.expressions.impl.Rint.evaluate()

            == 0);
      assertTrue(
        (Math.rint(fn1) - ((Number) e4.evaluate()).intValue())
          == 0);
      assertTrue(
        (Math.rint(dn1) - ((Number) e5.evaluate()).longValue())
          == 0);
/*
      assertSame((new Double(sn1)).getClass(), (e1.evaluate()).getClass());
      assertSame((new Double(in1)).getClass(), (e2.evaluate()).getClass());
      assertSame((new Double(ln1)).getClass(), (e3.evaluate()).getClass());

Examples of org.apache.imperius.spl.parser.expressions.impl.Round.evaluate()

            == 0);
      assertTrue(
        (Math.round(fn1) - ((Number) e4.evaluate()).intValue())
          == 0);
      assertTrue(
        (Math.round(dn1) - ((Number) e5.evaluate()).longValue())
          == 0);
/*
//      assertSame((new Short(sn1)).getClass(), (e1.evaluate()).getClass());
//      assertSame((new Integer(in1)).getClass(), (e2.evaluate()).getClass());
//      assertSame((new Long(ln1)).getClass(), (e3.evaluate()).getClass());

Examples of org.apache.imperius.spl.parser.expressions.impl.SdInCollection.evaluate()

           
            v.add(collection);
            Expression es1 = new SdInCollection(v,true);
            v.clear();
           //System.out.println(((Number)es1.evaluate()).floatValue());
            assertTrue(((Number)es1.evaluate()).floatValue()==(float)2.2803508501982757e+000);
           
           
           
        } catch (SPLException e) {
            fail("Received evaluation exception " + e.getMessage());

Examples of org.apache.imperius.spl.parser.expressions.impl.SquareRoot.evaluate()

                (new Double(Math.sqrt(fn1)).floatValue()
                    - ((Number) e4.evaluate()).floatValue())
                    == 0);
            assertTrue(
                (new Double(Math.sqrt(dn1)).doubleValue()
                    - ((Number) e5.evaluate()).doubleValue())
                    == 0);
                   
      //assertSame((new Double(dn1)).getClass(), (e1.evaluate()).getClass());                   
        } catch (SPLException e) {
            fail("Received evaluation exception " + e.getMessage());

Examples of org.apache.imperius.spl.parser.expressions.impl.StartsWith.evaluate()

      v.add(propertySensor1);
      v.add(propertySensor2);
      Expression eps1 = new StartsWith(v,true);

      assertTrue(((Boolean) (e1.evaluate())).booleanValue());
      assertTrue(((Boolean) (eps1.evaluate())).booleanValue());
    } catch (SPLException e) {
      fail("Received evaluation exception " + e.getMessage());
    } catch (Exception e) {
      fail("Received expression exception " + e.getMessage());
    }

Examples of org.apache.imperius.spl.parser.expressions.impl.StringLength.evaluate()

      assertTrue(
          new Integer(s1.length()).compareTo((Integer)eps1.evaluate()) == 0);
      assertTrue(
          new Integer(s2.length()).compareTo((Integer)eps2.evaluate()) == 0);
      assertTrue(
          new Integer(s3.length()).compareTo((Integer)eps3.evaluate()) == 0);
    } catch (SPLException e) {
      fail("Received evaluation exception " + e.getMessage());
    } catch (Exception e) {
      fail("Received expression exception " + e.getMessage());
    }

Examples of org.apache.imperius.spl.parser.expressions.impl.SubCollection.evaluate()

           
            v.add(collection);
            v.add(collection1);
            Expression es1 = new SubCollection(v,true);
            v.clear();
            assertTrue(((Boolean)es1.evaluate()).booleanValue());

           
        } catch (SPLException e) {
          e.printStackTrace();
            fail("Received evaluation exception " + e.getMessage());

Examples of org.apache.imperius.spl.parser.expressions.impl.Subtraction.evaluate()

        ((fn1 - fn2)
          - ((Number) eps4.evaluate()).floatValue())
          == 0);
      assertTrue(
        ((dn1 - dn2)
          - ((Number) eps5.evaluate()).doubleValue())
          == 0);
    /* 
//      assertSame((new Integer(sn1 - sn2)).getClass(),
//          (eps1.evaluate()).getClass());
      assertSame((new Integer(in1 - in2)).getClass(),

Examples of org.apache.imperius.spl.parser.expressions.impl.Sum.evaluate()

            Expression collection = new BasicCollectionExpression(vbytes,null);
           
            v.add(collection);
            Expression es1 = new Sum(v,true);
            v.clear();
            assertTrue(((Number)es1.evaluate()).floatValue()==(float)79.560005);

           
        } catch (SPLException e) {
            fail("Received evaluation exception " + e.getMessage());
        } catch (Exception e) {

Examples of org.apache.imperius.spl.parser.expressions.impl.ToBoolean.evaluate()

             
             
              Boolean x=(Boolean)es1.evaluate();
              assertTrue(x.booleanValue());
              x=(Boolean)es2.evaluate();
              assertFalse(x.booleanValue());
                     
             
          } catch (SPLException e) { 
            logger.severe("Received evaluation exception " + e.getMessage());
TOP
Copyright © 2018 www.massapi.com. 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.