public Object process(InvocableMap.Entry entry) { Vet vet = (Vet) entry.getValue(); if (vet.getSpecialties().contains(specialty)) { return false; } vet.addSpecialty(specialty); return true; }
@Override public Object process(InvocableMap.Entry entry) { Object value = entry.getValue(); return condition.evaluate(value) ? value : null; }