boolean (T object) { if (!myProcessedSet.contains(object)) { myProcessedSet.add(object); final boolean value = myCondition.value(object); if (value) { myTrueSet.add(object); return true; } return false; } return myTrueSet.contains(object); }