/** * Add all the elements in the given set that are not already * in this ordered set. */ public boolean addAll(Collection<? extends T> c) { boolean setChanged = false; if (c != null) { for (T o : c) { if (add(o)) { setChanged = true; } } } return setChanged; } }
/** * Add all the elements in the given set that are not already * in this ordered set. */ public boolean addAll(Collection<? extends T> c) { boolean setChanged = false; if (c != null) { for (T o : c) { if (add(o)) { setChanged = true; } } } return setChanged; } }
@Override public boolean add(String s) { Map<String, String> up2sname = getUrlPatternToServletNameMap(); if (up2sname != null) { String name = getCanonicalName(); String oldName = up2sname.put(s, getCanonicalName()); if (oldName != null && (!oldName.equals(name))) { throw new IllegalArgumentException(localStrings.getLocalString( "enterprise.deployment.exceptionsameurlpattern", "Servlet [{0}] and Servlet [{1}] have the same url pattern: [{2}]", new Object[] { oldName, name, s })); } } return super.add(s); }