I've lately bumped in something weird. Consider the following method:
public boolean addAll(Collection<T> col) {
boolean added = false;
for(T t : col)
added |= add(t);
return added;
}
Although I understand what this wants to do, that's - not change it to false, if it exceeded at least once (if a later element failed). But what does this actually mean. How is it read. And are there any similar gadgets in boolean
?