Package org.jboss.jms.selector

Examples of org.jboss.jms.selector.Operator.apply()


   {
      // Neg Long
      log.trace("parse(-12345 = -1 * 12345)");
      Operator result = (Operator) parser.parse("-12345 = -1 * 12345", identifierMap);
      log.trace("result -> "+result);
      Boolean b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());

      // Neg Double
      log.trace("parse(-1 * 12345.67 = -12345.67)");
      result = (Operator) parser.parse("-1 * 12345.67 = -12345.67", identifierMap);
View Full Code Here


      // Neg Double
      log.trace("parse(-1 * 12345.67 = -12345.67)");
      result = (Operator) parser.parse("-1 * 12345.67 = -12345.67", identifierMap);
      log.trace("result -> "+result);
      b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());

      log.trace("parse(-(1 * 12345.67) = -12345.67)");
      result = (Operator) parser.parse("-(1 * 12345.67) = -12345.67", identifierMap);
      log.trace("result -> "+result);
View Full Code Here

      assertTrue("is true", b.booleanValue());

      log.trace("parse(-(1 * 12345.67) = -12345.67)");
      result = (Operator) parser.parse("-(1 * 12345.67) = -12345.67", identifierMap);
      log.trace("result -> "+result);
      b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());
   }
  
   public void testPrecedenceNAssoc() throws Exception
   {
View Full Code Here

   public void testPrecedenceNAssoc() throws Exception
   {
      log.trace("parse(4 + 2 * 3 / 2 = 7)");
      Operator result = (Operator) parser.parse("4 + 2 * 3 / 2 = 7", identifierMap);
      log.trace("result -> "+result);
      Boolean b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());
     
      log.trace("parse(4 + ((2 * 3) / 2) = 7)");
      result = (Operator) parser.parse("4 + ((2 * 3) / 2) = 7", identifierMap);
      log.trace("result -> "+result);
View Full Code Here

      assertTrue("is true", b.booleanValue());
     
      log.trace("parse(4 + ((2 * 3) / 2) = 7)");
      result = (Operator) parser.parse("4 + ((2 * 3) / 2) = 7", identifierMap);
      log.trace("result -> "+result);
      b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());
     
      log.trace("parse(4 * -2 / -1 - 4 = 4)");
      result = (Operator) parser.parse("4 * -2 / -1 - 4 = 4", identifierMap);
      log.trace("result -> "+result);
View Full Code Here

      assertTrue("is true", b.booleanValue());
     
      log.trace("parse(4 * -2 / -1 - 4 = 4)");
      result = (Operator) parser.parse("4 * -2 / -1 - 4 = 4", identifierMap);
      log.trace("result -> "+result);
      b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());
     
      log.trace("parse(4 * ((-2 / -1) - 4) = -8)");
      result = (Operator) parser.parse("4 * ((-2 / -1) - 4) = -8", identifierMap);
      log.trace("result -> "+result);
View Full Code Here

      assertTrue("is true", b.booleanValue());
     
      log.trace("parse(4 * ((-2 / -1) - 4) = -8)");
      result = (Operator) parser.parse("4 * ((-2 / -1) - 4) = -8", identifierMap);
      log.trace("result -> "+result);
      b = (Boolean) result.apply();
      assertTrue("is true", b.booleanValue());
   }
  
   public void testIds() throws Exception
   {
View Full Code Here

      Identifier d = (Identifier) identifierMap.get("d");
      d.setValue(new Long(2));
      Identifier e = (Identifier) identifierMap.get("e");
      e.setValue(new Long(7));
      log.trace("result -> "+result);
      Boolean bool = (Boolean) result.apply();
      assertTrue("is true", bool.booleanValue());
     
   }
  
   public void testTrueINOperator() throws Exception
View Full Code Here

      log.trace("parse(Status IN ('new', 'cleared', 'acknowledged'))");
      Operator result = (Operator) parser.parse("Status IN ('new', 'cleared', 'acknowledged')", identifierMap);
      Identifier a = (Identifier) identifierMap.get("Status");
      a.setValue("new");
      log.trace("result -> "+result);
      Boolean bool = (Boolean) result.apply();
      assertTrue("is true", bool.booleanValue());
   }
   public void testFalseINOperator() throws Exception
   {
      log.trace("parse(Status IN ('new', 'cleared', 'acknowledged'))");
View Full Code Here

      log.trace("parse(Status IN ('new', 'cleared', 'acknowledged'))");
      Operator result = (Operator) parser.parse("Status IN ('new', 'cleared', 'acknowledged')", identifierMap);
      Identifier a = (Identifier) identifierMap.get("Status");
      a.setValue("none");
      log.trace("result -> "+result);
      Boolean bool = (Boolean) result.apply();
      assertTrue("is false", !bool.booleanValue());
   }
  
   public void testTrueOROperator() throws Exception
   {
View Full Code Here

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.