if (next == null) {
if (iterator.hasNext()) {
next = iterator.next();
} else if (enumeration != null) {
while (next == null && enumeration.hasMoreElements()) {
next = enumeration.nextElement();
if (set.contains(next)) {
next = null;
}
}
}
}
return next != null;