title: Using find method of org.apache.commons.collections4.CollectionUtils with Predicate
body: <p>I was using <code>org.apache.commons.collections.CollectionUtils</code> and for this version using find method was like this:</p>
  
  <pre><code>BeanPropertyValueEqualsPredicate objIdEqualsPredicate = new BeanPropertyValueEqualsPredicate("objId", objId);
  myObj = (MyClass) CollectionUtils.find(myObjSet, objIdEqualsPredicate);
  </code></pre>
  
  <p>But with <code>org.apache.commons.collections4.CollectionUtils</code>, I don't know how to make it work.
  Here what I do now but if there is a clear way of it, I will be glad to learn:</p>
  
  <pre><code>Predicate&lt;MyClass&gt; objIdEqualsPredicate = new Predicate&lt;MyClass&gt;() {
      @Override
      public boolean evaluate(MyClass obj) {
          return obj.getObjId().equals(objId);
      }
  };
  myObj = CollectionUtils.find(myObjSet, objIdEqualsPredicate);
  </code></pre>
  
  <p>Is there a way to filter some objects according to the their fields' values. If possible I don't want to use anonymous class for this.</p>
  
  <p>Thanks.</p>