public void setTileFactory(String name) {
if (name.equals(tileFactoryName)) {
return;
}
AbstractTileFactory tileFactory = (AbstractTileFactory) tileFactories.get(name);
if (tileFactory == null) {
throw new RuntimeException("Internal error: Invalid tile factory name");
}
this.tileFactoryName = name;
this.tileFactory = tileFactory;