for (CallbackItem<?> item : items) if (item.getWhenRequired().equals(state))
if (callback.getWhenRequired().equals(state) == false) throw new IllegalArgumentException(callback + " does not have the required state " + state);
for (CallbackItem<?> item : items) if (item.getWhenRequired().equals(state))
if (callback.getWhenRequired().equals(state) == false) throw new IllegalArgumentException(callback + " does not have the required state " + state);