Package util

Examples of util.ValueMap


    assertEquals(value.compareTo(new BigDecimal("390636.6")), 0);
  }
 
  @Test
  public void complexExp3() throws Exception {
    ValueMap values = new ValueMap();
    values.put("val1", new BigDecimal(5));
    values.put("val2", new BigDecimal(7));
    values.put("val3", new BigDecimal(8));
    values.put("val4", new BigDecimal(20));
    values.put("val5", new BigDecimal(20));
   
    Parser p = new Parser("val1+val2-((val3*val4/val5)^2.0)+val1^2.0^3.0");
    BigDecimal value = p.eval(p.lexicalVerifier(), values);
   
    assertEquals(value.compareTo(new BigDecimal("390573")), 0);
View Full Code Here

TOP

Related Classes of util.ValueMap

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.