@Component @Lazy @DependentInitialisation(MapInitializedBean.class) public class CitiesState extends java.lang.Object
| Constructor | Description |
|---|---|
CitiesState() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCity(ICity city,
CityState cityState) |
Add a new city.
|
java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
findCityWithMostNeededWare() |
Find a possible city that has needed wares.
|
java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> |
findCityWithSurplusWare() |
Find a possible city that has needed wares.
|
java.util.List<CityState> |
getCityEngineStates() |
|
void |
init() |
public void init()
public void addCity(ICity city, CityState cityState)
city - for which to add a CityStatecityState - to be addedpublic java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> findCityWithMostNeededWare()
GenericPair of city and ware.public java.util.Optional<ch.sahits.datastructure.GenericPair<ICity,IWare>> findCityWithSurplusWare()
GenericPair of city and ware.public java.util.List<CityState> getCityEngineStates()
Copyright © 2011-2018 Sahits GmbH. All Rights Reserved.