public Model addModel(Model model) throws IllegalArgumentException { if (model == null) { throw new IllegalArgumentException("'Model' must not be null"); } if (model.getSignature() != null) { model.getSignature().removeModel(model); } model.setSignature(this); models.put(model.getKey(), model); return model; }