public void addIfNew()

in src/main/java/org/apache/sling/commons/testing/integration/NameValuePairList.java [57:71]


    public void addIfNew(String name, String value) {
        boolean found = false;
        for (ListIterator<NameValuePair> li = delegate.listIterator(); li.hasNext();) {
            NameValuePair current = li.next();
            if (current.getName().equals(name)) {
                found = true;
                break;
            }
        }

        if (!found) {
            delegate.add(new NameValuePair(name, value));
        }

    }