public void removeComponent(ModifiableComponent comp) { if (comp instanceof SocietyComponent) removeSociety((SocietyComponent)comp); if (comp instanceof RecipeComponent) removeRecipe((RecipeComponent)comp);
public void removeComponent(ModifiableComponent comp) throws IllegalArgumentException { if (comp instanceof SocietyComponent) { removeSocietyComponent(); } else if (comp instanceof RecipeComponent) { removeRecipeComponent((RecipeComponent)comp); } else { throw new IllegalArgumentException("Unsupported Component Type"); }
  public void removeComponent(ModifiableComponent comp) {    if (comp instanceof SocietyComponent)      removeSociety((SocietyComponent)comp);    if (comp instanceof RecipeComponent)      removeRecipe((RecipeComponent)comp);    // Must handle random components!!!  }