* available in {@link #staticScriptResources} as a key, a {@link DuplicateResourceKeyException} is thrown.
*/
public ImmutableStaticScriptResourcesBuilder add(Collection<StaticScriptResource> toAdd) throws DuplicateResourceKeyException {
for (StaticScriptResource staticScriptResource : toAdd) {
String resourcePath = staticScriptResource.getResourcePath();
StaticScriptResource availableValue = staticScriptResources.get(resourcePath);
if (availableValue != null) {
throw new DuplicateResourceKeyException("Ignoring " + StaticScriptResource.class.getSimpleName() + " " + staticScriptResource
+ " because the given resource path was already provided by " + availableValue);
} else {
/* add only if not there already */