title: Algebra equation parser for java
body: <p>I need a library to be able to parse an equation an give me the result giving the inputs.</p>
  
  <p>For example something like this:</p>
  
  <pre><code>String equation = "x + y + z";
  Map&lt;String, Integer&gt; vars = new HashMap&lt;String, Integer&gt;();
  vars.add("x", 2);
  vars.add("y", 1),
  vars.add("z", 3);
  EquationSolver solver = new EquationSolver(equation, vars);
  int result = solver.getResult();
  System.out.println("result: " + result);
  </code></pre>
  
  <p>And evaluates to:
  6</p>
  
  <p>Is there any kind of library for java that can do that for me?</p>
  
  <p>Thanks</p>