public void add(Marker reference) {
        if (reference == null) {
            throw new IllegalArgumentException("A null value cannot be added to a Marker as reference.");
        }

        // no point in adding the reference multiple times
        if (this.contains(reference)) {
            return;

        } else if (reference.contains(this)) { // avoid recursion
            // a potential reference should not hold its future "parent" as a reference
            return;
        } else {
            referenceList.add(reference);
        }
    }
A simple implementation of the {@link Marker} interface.

@author Ceki G&uuml;lc&uuml;
@author Joern Huxhorn
slf4j-api/src/main/java/org/slf4j/helpers/BasicMarker.java