@Override public final boolean test(IPerson person) { boolean result = false; Object[] atts = person.getAttributeValues(getAttributeName()); if (atts != null) { for (int i = 0; i < atts.length && result == false; i++) { String att = (String) atts[i]; result = test(att); // Assume that we should perform OR matching on multi-valued // attributes. If the current attribute matches, return true // for the person. if (result) { return true; } } } return result; }
@Override public final boolean test(IPerson person) { boolean result = false; Object[] atts = person.getAttributeValues(getAttributeName()); if (atts != null) { for (int i = 0; i < atts.length && result == false; i++) { String att = (String) atts[i]; result = test(att); // Assume that we should perform OR matching on multi-valued // attributes. If the current attribute matches, return true // for the person. if (result) { return true; } } } return result; }