Examples of evaluate()


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

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

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

     
      Expression eps1 = new Concatenate(v,true);
      s1 = s1.substring(1, s1.length()-1);
      s2 = s2.substring(1, s2.length()-1);
      assertTrue(e1.evaluate().equals(s1 + s2));
      assertTrue(eps1.evaluate().equals(s1 + s2));
    } 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.Contains.evaluate()

      v.add(propertySensor1);
      v.add(propertySensor2);
      Expression eps1 = new Contains(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.DateTimeConstant.evaluate()

            }
           
            cal.set(Calendar.ZONE_OFFSET, zoneOffsetMilliseconds);
            //System.out.println("created calendar");
            DateTimeConstant dtc=new DateTimeConstant(CIMDateString);
            Calendar cal1= (Calendar)dtc.evaluate();
           //System.out.println("cal1.getTimeInMillis() "+cal1.getTime()+" "+cal1.getTimeInMillis());
           
           //System.out.println("cal.getTimeInMillis() "+cal.getTime()+" "+cal.getTimeInMillis());
           
          //  assertTrue(cal1.getTimeInMillis()==cal.getTimeInMillis());         

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

          == 0);
      assertTrue(
        ((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.EndsWith.evaluate()

      v.add(propertySensor1);
      v.add(propertySensor2);
      Expression eps1 = new EndsWith(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.EqCollections.evaluate()

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

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

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

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

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

                (new Double(Math.exp(fn1)).floatValue()
                    - ((Number) e4.evaluate()).floatValue())
                    == 0);
            assertTrue(
                (new Double(Math.exp(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.Floor.evaluate()

            == 0);
      assertTrue(
        (Math.floor(fn1) - ((Number) e4.evaluate()).intValue())
          == 0);
      assertTrue(
        (Math.floor(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());
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.