title: Library for evaluating logical expressions on Java objects
body: <p>Let's say I have the following class:</p>
  
  <pre><code>class Person {
      int age;
      String city;
      Collection&lt;Person&gt; friends;
      Person spouse;
  }
  </code></pre>
  
  <p>I need a library which would allow me to evaluate whether a logical expression is true on a given Person object. The expression would look something like this:</p>
  
  <pre><code>((age&gt;25 OR spouse.age&gt;27) AND city=="New-York" AND size(friends)&gt;100)
  </code></pre>
  
  <p>So, the requirements are:</p>
  
  <ol>
  <li>Ability to use basic logical operators</li>
  <li>Access properties of the given object</li>
  <li>Access properties of an internal object</li>
  <li>Use simple mathematical\sql-like functions such as size,max,sum</li>
  </ol>
  
  <p>Suggestions?</p>