This would take a Collection of person objects and filter out any people whose activeEmployee property is false. Assuming...
peeopleCollection is an object which represents a person. getActiveEmployee() method which returns the boolean value for the object's activeEmployee property. Another typical usage might look like: // create the closure BeanPropertyValueEqualsPredicate predicate = new BeanPropertyValueEqualsPredicate( "personId", "456-12-1234" ); // search the Collection CollectionUtils.find( peopleCollection, predicate );
This would search a Collection of person objects and return the first object whose personId property value equals 456-12-1234. Assuming...
peeopleCollection is an object which represents a person. getPersonId() method which returns the value for the object's personId property. | |
| |