/** * Set nextObject to the next object. If there are no more * objects then return false. Otherwise, return true. */ private boolean setNextObject() { while (iter.hasNext()) { T object = iter.next(); if (predicate.evaluate(object)) { nextObject = object; nextObjectSet = true; return true; } } return false; }
/** * Set nextObject to the next object. If there are no more * objects then return false. Otherwise, return true. */ private boolean setNextObject() { while (iter.hasNext()) { T object = iter.next(); if (predicate.evaluate(object)) { nextObject = object; nextObjectSet = true; return true; } } return false; }