boolean (@NotNull Processor<? super V> p, Object v) { if (v instanceof ValueList) { //noinspection unchecked for (V o : (ValueList<V>)v) { if (!p.process(o)) { return false; } } return true; } else { //noinspection unchecked return v == null || p.process((V)v); } }