Class CityProductionStorage
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.CityProductionStorage
-
@Service @Lazy @DependentInitialisation(MapInitializedBean.class) public class CityProductionStorage extends java.lang.Object
This is a map of the production stores for all city owned workshops.- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on May 14, 2016
-
-
Constructor Summary
Constructors Constructor Description CityProductionStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ICity city)
Create the production storage for an additional city.ProductionStorage
getStorage(ICity city)
Retrieve theProductionStorage
for the city.private void
init()
-
-
-
Field Detail
-
storage
private java.util.Map<ICity,ProductionStorage> storage
-
map
@Autowired private IMap map
-
context
@Autowired private org.springframework.context.ApplicationContext context
-
-
Method Detail
-
init
@PostConstruct private void init()
-
add
public void add(ICity city)
Create the production storage for an additional city.- Parameters:
city
- for which to add a production storage
-
getStorage
public ProductionStorage getStorage(ICity city)
Retrieve theProductionStorage
for the city.- Parameters:
city
- for which to retrieve the production storage- Returns:
- production storage for the city.
-
-