Examples of evaluate()


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

            Expression collection = new BasicCollectionExpression(vbytes,null);
           
            v.add(collection);
            Expression es1 = new MedianInCollection(v,true);
            v.clear();
            assertTrue(((Number)es1.evaluate()).floatValue()==(float)9.7);
           
           
           
        } catch (SPLException e) {
            fail("Received evaluation exception " + e.getMessage());

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

      assertTrue(((String) essnl.evaluate()).equals("icCom"));
      assertTrue(((String) essnr.evaluate()).equals("putin"));
      assertTrue(((String) esnsl.evaluate()).equals("n"));
      assertTrue(((String) esnsr.evaluate()).equals("pu"));
      assertTrue(((String) esssl.evaluate()).equals(""));
      assertTrue(((String) esssr.evaluate()).equals("Aut"));

      v.clear();
      v.add(new StringConstant(string));
      v.add(new IntegerConstant(4));
      v.add(new IntegerConstant(5));

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

            assertTrue(Math.min(dn2, sn1)- ((Number) emix5.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(sn1, sn2)- ((Number) eps1.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(in1, in2)- ((Number) eps2.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(ln1, ln2)- ((Number) eps3.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(fn1, fn2)- ((Number) eps4.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(dn1, dn2)- ((Number) eps5.evaluate()).doubleValue()== 0);

/*
      assertSame((new Short(sn1).getClass()), (eps1.evaluate()).getClass());                   
      assertSame((new Integer(in1).getClass()), (eps2.evaluate()).getClass());                   
      assertSame((new Long(ln1).getClass()), (eps3.evaluate()).getClass());                   

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

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

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

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

                    == 0);
            assertTrue(
                ((fn1 % fn2) - ((Number) ef.evaluate()).floatValue())
                    == 0);
            assertTrue(
                ((dn1 % dn2) - ((Number) ed.evaluate()).doubleValue())
                    == 0);

/*      assertSame(
        (new Integer(sn1 % sn2)).getClass(),
        (es.evaluate()).getClass());

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

              assertFalse(
                  ((Boolean) firstExpression.evaluate()).booleanValue());
              assertTrue(
                  ((Boolean) secondExpression.evaluate()).booleanValue());
              assertTrue(
                  ((Boolean) thirdExpression.evaluate()).booleanValue());
            
          } catch (SPLException e) { 
            logger.severe("Received evaluation exception " + e.getMessage());
            e.printStackTrace();
              fail("Received evaluation exception " + e.getMessage());

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

                (new Double(Math.pow(fn1, fn2)).floatValue()
                    - ((Number) e4.evaluate()).floatValue())
                    == 0);
            assertTrue(
                (new Double(Math.pow(dn1, dn2)).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.Product.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());
 

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

      v.add(propertySensor2);
      v.add(propertySensor3);
      Expression eps1 = new ReplaceSubstring(v,true);
      s4 = s4.substring(1, s4.length()-1);
      assertTrue(s4.compareTo((String)e1.evaluate()) == 0);
      assertTrue(s4.compareTo((String)eps1.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.RightSubstring.evaluate()

          ((String) esnr.evaluate()).equals("nomicComputing"));
      assertTrue(((String) esnrmin1.evaluate()).equals(""));
      assertTrue(((String) essl.evaluate()).equals("icComputing"));
      assertTrue(((String) esslne.evaluate()).equals(""));
      assertTrue(((String) essr.evaluate()).equals("puting"));
      assertTrue(((String) essrne.evaluate()).equals(""));
    } catch (SPLException e) {
      fail("Received evaluation exception " + e.getMessage());
    } catch (Exception e) {
      fail("Received expression 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.