notification-portlet-api/src/main/java/org/jasig/portlet/notice/NotificationResponse.java
public NotificationResponse filterErrors(Set<Integer> hiddenErrorKeys) {
        NotificationResponse rslt = new NotificationResponse(this);
        List<NotificationError> filteredErrors = new ArrayList<>();
        for (NotificationError r : errors) {
            if (!hiddenErrorKeys.contains(r.getKey())) {
                filteredErrors.add(r);
            }
        }
        rslt.setErrors(filteredErrors); // deep copy
        return rslt;
    }
public NotificationResponse filterErrors(Set<Integer> hiddenErrorKeys) {
        NotificationResponse rslt = new NotificationResponse(this);
        List<NotificationError> filteredErrors = new ArrayList<>();
        for (NotificationError r : errors) {
            if (!hiddenErrorKeys.contains(r.getKey())) {
                filteredErrors.add(r);
            }
        }
        rslt.setErrors(filteredErrors); // deep copy
        return rslt;
    }
Return a <b>new instance</b> of {@link NotificationResponse} from which
the specified errors have been removed.  The original instances are
unchanged.

@param hiddenErrorKeys set of error keys to exclude from result