Package javax.management

Examples of javax.management.ValueExp


      assertTrue(result.apply(null));
   }

   public void testDoubleOperations() throws Exception
   {
      ValueExp value1 = Query.value(new Double(3.0D));
      ValueExp value2 = Query.value(new Double(4.0D));
      ValueExp op = Query.plus(value1, value2);
      QueryExp result = Query.eq(Query.value(7.0D), op);
      assertTrue(result.apply(null));

      op = Query.minus(value1, value2);
      result = Query.eq(Query.value(-1.0D), op);
View Full Code Here


   public void testExceptions() throws Exception
   {
      QueryExp operation = Query.eq(null, null);
      assertTrue(operation.apply(null));

      ValueExp value1 = Query.value(new Integer(3));
      operation = Query.eq(value1, null);
      assertTrue(!operation.apply(null));

      operation = Query.eq(null, value1);
      assertTrue(!operation.apply(null));

      ValueExp value2 = Query.value(new Long(3));
      ValueExp result = Query.plus(value1, value2);
      operation = Query.eq(Query.value(6), result);
      assertTrue(operation.apply(null));

      // Comparing apple and oranges
      ValueExp bvalue1 = Query.value(true);
      operation = Query.eq(bvalue1, value2);
      assertTrue(!operation.apply(null));

      // Adding 2 booleans
      ValueExp bvalue2 = Query.value(true);
      result = Query.plus(bvalue1, bvalue2);
      operation = Query.eq(Query.value(false), result);
      try
      {
         operation.apply(null);
View Full Code Here

      assertTrue(!operation.apply(null));
   }

   public void testNumericals() throws Exception
   {
      ValueExp value1 = Query.value(new Integer(3));
      ValueExp value2 = Query.value(new Long(3));
      QueryExp operation = Query.eq(value1, value2);
      assertTrue(operation.apply(null));

      value1 = Query.value(new Integer(5));
      value2 = Query.value(new Long(4));
View Full Code Here

      assertTrue(operation.apply(null));
   }

   public void testBooleans() throws Exception
   {
      ValueExp value1 = Query.value(true);
      ValueExp value2 = Query.value(false);
      QueryExp operation = Query.eq(value1, value2);
      assertTrue(!operation.apply(null));

      operation = Query.or(Query.eq(value1, value1), Query.eq(value1, value2));
      assertTrue(operation.apply(null));
View Full Code Here

      compareQueryExp(o1, o2);
   }

   public void compareBinaryOpValueExp(Object o1, Object o2) throws Exception
   {
      ValueExp val1 = (ValueExp)o1;
      ValueExp val2 = (ValueExp)o2;

      compareNumericValueExp(val1.apply(null), val2.apply(null));
   }
View Full Code Here

TOP

Related Classes of javax.management.ValueExp

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.