title: Employing Two Separate Filtering Criteria, using Lambdaj
body: <p>Using Lambdaj, I am trying to isolate, from a list, an object that satisfies 2 separate criteria. Both of the following will achieve my goal.
  A)</p>
  
  <pre><code>    List&lt;SomeObject&gt; someObjectsWithMatchingSomeObjectIds = select(foo.getSomeParentObject().getSomeObjects(), having(on(
              SomeObject.class).getId(), equalTo(123)));
      SomeObject someObject = selectFirst(someObjectsWithMatchingSomeObjectIds, having(on(SomeObject.class).getLoanTerm(),
              notNullValue()));
  </code></pre>
  
  <p>B)</p>
  
  <pre><code>    SomeObject someObject = selectFirst(select(foo.getSomeParentObject().getSomeObjects(), having(on(SomeObject.class)
              .getId(), equalTo(123))), having(on(SomeObject.class).getLoanTerm(), notNullValue()));
  </code></pre>
  
  <p>The first one seems more readable, particularly for people who are not familiar with the API. The second one seems to harness the functional programming aspect of lambdaj, which is best? </p>
  
  <p>Readability wins I suppose. However, I wonder, is there a more concise way to handle two separate conditions when filtering a collection, using LambdaJ?</p>