Package org.apache.imperius.spl.parser.expressions.impl

Examples of org.apache.imperius.spl.parser.expressions.impl.DoubleConstant


    propertySensor4=new IntegerConstant(in2);
    propertySensor5=new LongConstant(ln1);
    propertySensor6=new LongConstant(ln2);
    propertySensor7=new FloatConstant(fn1);
    propertySensor8=new FloatConstant(fn2);
    propertySensor9=new DoubleConstant(dn1);
    propertySensor10=new DoubleConstant(dn2);

   
        //SensorLookup lookup = new SensorLookupImpl(map);

        try {
            Vector v = new Vector();
           
            v.add(new ShortConstant(sn2));
            v.add(new ShortConstant(sn3));
            Expression es = new Product(v,true);

            v.clear();
          
            v.add(new IntegerConstant(in2));
            v.add(new IntegerConstant(in3));
            Expression ei = new Product(v,true);

            v.clear();
          
            v.add(new LongConstant(ln2));
            v.add(new LongConstant(ln3));
            Expression el = new Product(v,true);

            v.clear();
           
            v.add(new FloatConstant(fn2));
            v.add(new FloatConstant(fn3));
            Expression ef = new Product(v,true);

            v.clear();
           
            v.add(new DoubleConstant(dn2));
            v.add(new DoubleConstant(dn3));
            Expression ed = new Product(v,true);

            v.clear();
            v.add(new ShortConstant(sn1));
            v.add(new IntegerConstant(in1));
           
            Expression emix1 = new Product(v,true);
           
            v.clear();
           
            v.add(new LongConstant(ln1));
            v.add(new FloatConstant(fn1));
           
            Expression emix2 = new Product(v,true);
           
            v.clear();
           
            v.add(new FloatConstant(fn1));
            v.add(new DoubleConstant(dn1));
            Expression emix3 = new Product(v,true);

      v.clear();
      v.add(propertySensor1);
      v.add(propertySensor2);
View Full Code Here


    propertySensor4=new IntegerConstant(in2);
    propertySensor5=new LongConstant(ln1);
    propertySensor6=new LongConstant(ln2);
    propertySensor7=new FloatConstant(fn1);
    propertySensor8=new FloatConstant(fn2);
    propertySensor9=new DoubleConstant(dn1);
    propertySensor10=new DoubleConstant(dn2);

   
        //SensorLookup lookup = new SensorLookupImpl(map);

        try {
            Vector v = new Vector();
            v.add(new ShortConstant(sn1));
            v.add(new ShortConstant(sn2));
            Expression es = new Division(v,true);

            v.clear();
            v.add(new IntegerConstant(in1));
            v.add(new IntegerConstant(in2));
            Expression ei = new Division(v,true);

            v.clear();
            v.add(new LongConstant(ln1));
            v.add(new LongConstant(ln2));
            Expression el = new Division(v,true);

            v.clear();
            v.add(new FloatConstant(fn1));
            v.add(new FloatConstant(fn2));
            Expression ef = new Division(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            v.add(new DoubleConstant(dn2));
            Expression ed = new Division(v,true);

            v.clear();
            v.add(new ShortConstant(sn1));
            v.add(new IntegerConstant(in1));
            Expression emix1 = new Division(v,true);

            v.clear();
            v.add(new ShortConstant(sn1));
            v.add(new LongConstant(ln1));
            Expression emix2 = new Division(v,true);

            v.clear();
            v.add(new ShortConstant(sn1));
            v.add(new FloatConstant(fn1));
            Expression emix3 = new Division(v,true);

            v.clear();
            v.add(new ShortConstant(sn1));
            v.add(new DoubleConstant(dn1));
            Expression emix4 = new Division(v,true);

            v.clear();
            v.add(new IntegerConstant(in1));
            v.add(new LongConstant(ln1));
            Expression emix5 = new Division(v,true);

            v.clear();
            v.add(new IntegerConstant(in1));
            v.add(new FloatConstant(fn1));
            Expression emix6 = new Division(v,true);

            v.clear();
            v.add(new IntegerConstant(in1));
            v.add(new DoubleConstant(dn1));
            Expression emix7 = new Division(v,true);

            v.clear();
            v.add(new LongConstant(ln1));
            v.add(new FloatConstant(fn1));
            Expression emix8 = new Division(v,true);

            v.clear();
            v.add(new LongConstant(ln1));
            v.add(new DoubleConstant(dn1));
            Expression emix9 = new Division(v,true);

            v.clear();
            v.add(new FloatConstant(fn1));
            v.add(new DoubleConstant(dn1));
            Expression emix10 = new Division(v,true);

      v.clear();
      v.add(propertySensor1);
      v.add(propertySensor2);
View Full Code Here

            v.add(new FloatConstant(fn1));
            v.add(new FloatConstant(fn2));
            Expression ef = new Mod(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            v.add(new DoubleConstant(dn2));
            Expression ed = new Mod(v,true);

            assertTrue(
                ((sn1 % sn2) - ((Number) es.evaluate()).shortValue())
                    == 0);
View Full Code Here

    propertySensor4=new IntegerConstant(in2);
    propertySensor5=new LongConstant(ln1);
    propertySensor6=new LongConstant(ln2);
    propertySensor7=new FloatConstant(fn1);
    propertySensor8=new FloatConstant(fn2);
    propertySensor9=new DoubleConstant(dn1);
    propertySensor10=new DoubleConstant(dn2);

   
        //SensorLookup lookup = new SensorLookupImpl(map);

        try {
            Vector v = new Vector();
            /*v.add(new ShortConstant(sn1));
            v.add(new ShortConstant(sn2));
            v.add(new IntegerConstant(in1));
            v.add(new IntegerConstant(in2));
            v.add(new LongConstant(ln1));
            v.add(new LongConstant(ln2));
            v.add(new FloatConstant(fn1));
            v.add(new FloatConstant(fn2));
            v.add(new DoubleConstant(dn1));
            v.add(new DoubleConstant(dn2));
            Expression e = new Max(v,true);*/

            v.clear();
            v.add(new ShortConstant(sn2));
            v.add(new IntegerConstant(in1));
      Expression emix1 = new Max(v,true);
      v.clear();
      v.add(new IntegerConstant(in2));
            v.add(new LongConstant(ln1));
      Expression emix2 = new Max(v,true);
      v.clear();
      v.add(new LongConstant(ln2));
            v.add(new FloatConstant(fn1));
      Expression emix3 = new Max(v,true);
      v.clear();
      v.add(new FloatConstant(fn2));
            v.add(new DoubleConstant(dn1));
            Expression emix4 = new Max(v,true);
            v.clear();
            v.add(new DoubleConstant(dn2));
            v.add(new ShortConstant(sn1));
            Expression emix5 = new Max(v,true);
     
           
            v.clear();
View Full Code Here

    propertySensor4=new IntegerConstant(in2);
    propertySensor5=new LongConstant(ln1);
    propertySensor6=new LongConstant(ln2);
    propertySensor7=new FloatConstant(fn1);
    propertySensor8=new FloatConstant(fn2);
    propertySensor9=new DoubleConstant(dn1);
    propertySensor10=new DoubleConstant(dn2);

        //SensorLookup lookup = new SensorLookupImpl(map);

        try {
            Vector v = new Vector();
           
            /*v.add(new ShortConstant(sn1));
            v.add(new ShortConstant(sn2));
            v.add(new IntegerConstant(in1));
            v.add(new IntegerConstant(in2));
            v.add(new LongConstant(ln1));
            v.add(new LongConstant(ln2));
            v.add(new FloatConstant(fn1));
            v.add(new FloatConstant(fn2));
            v.add(new DoubleConstant(dn1));
            v.add(new DoubleConstant(dn2));
            Expression e = new Min(v,true);*/
           
            v.clear();
            v.add(new ShortConstant(sn2));
            v.add(new IntegerConstant(in1));
      Expression emix1 = new Min(v,true);
      v.clear();
      v.add(new IntegerConstant(in2));
            v.add(new LongConstant(ln1));
      Expression emix2 = new Min(v,true);
      v.clear();
      v.add(new LongConstant(ln2));
            v.add(new FloatConstant(fn1));
      Expression emix3 = new Min(v,true);
      v.clear();
      v.add(new FloatConstant(fn2));
            v.add(new DoubleConstant(dn1));
            Expression emix4 = new Min(v,true);
            v.clear();
            v.add(new DoubleConstant(dn2));
            v.add(new ShortConstant(sn1));
            Expression emix5 = new Min(v,true);

      v.clear();
      v.add(propertySensor1);
View Full Code Here

        //HashMap map = new HashMap();
    propertySensor1=new ShortConstant(sn1);
    propertySensor2=new IntegerConstant(in1);
    propertySensor3=new LongConstant(ln1);
    propertySensor4=new FloatConstant(fn1);
    propertySensor5=new DoubleConstant(dn1);
        //SensorLookup lookup = new SensorLookupImpl(map);

        try {
            Vector v = new Vector();
            v.add(new ShortConstant(sn1));
            Expression e1 = new Ln(v,true);

            v.clear();
            v.add(new IntegerConstant(in1));
            Expression e2 = new Ln(v,true);

            v.clear();
            v.add(new LongConstant(ln1));
            Expression e3 = new Ln(v,true);

            v.clear();
            v.add(new FloatConstant(fn1));
            Expression e4 = new Ln(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            Expression e5 = new Ln(v,true);

      v.clear();
      v.add(propertySensor1);
      Expression eps1 = new Ln(v,true);
View Full Code Here

            v.clear();
            v.add(new FloatConstant(fn1));
            Expression e4 = new Exp(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            Expression e5 = new Exp(v,true);

            assertTrue(
                (new Double(Math.exp(sn1)).shortValue()
                    - ((Number) e1.evaluate()).shortValue())
View Full Code Here

            v.add(new FloatConstant(fn1));
            v.add(new FloatConstant(fn2));
            Expression e4 = new Power(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            v.add(new DoubleConstant(dn2));
            Expression e5 = new Power(v,true);

            assertTrue(
                (new Double(Math.pow(sn1, sn2)).shortValue()
                    - ((Number) e1.evaluate()).shortValue())
View Full Code Here

            v.clear();
            v.add(new FloatConstant(fn1));
            Expression e4 = new SquareRoot(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            Expression e5 = new SquareRoot(v,true);

            assertTrue(
                (new Double(Math.sqrt(sn1)).shortValue()
                    - ((Number) e1.evaluate()).shortValue())
View Full Code Here

            v.clear();
            v.add(new FloatConstant(fn1));
            Expression e4 = new Abs(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            Expression e5 = new Abs(v,true);

            assertTrue(
                (Math.abs(sn1) - ((Number) e1.evaluate()).shortValue())
                    == 0);
View Full Code Here

TOP

Related Classes of org.apache.imperius.spl.parser.expressions.impl.DoubleConstant

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.