Interface IContractBrokers
-
public interface IContractBrokersAccessting the contract broker for a specific player in a city.- Author:
- Andi Hotz, (c) Sahits GmbH, 2018 Created on Apr 30, 2018
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(IContractBroker broker, ICity city)java.util.Optional<IContractBroker>findContractBroker(ICity city, IPlayer player)Retrieve the contract broker in the city, who is waiting for a delivery by the player.booleanhasContractBroker(ICity city)Check if there is a contract broker defined for the city.
-
-
-
Method Detail
-
add
void add(IContractBroker broker, ICity city)
-
findContractBroker
java.util.Optional<IContractBroker> findContractBroker(ICity city, IPlayer player)
Retrieve the contract broker in the city, who is waiting for a delivery by the player.- Parameters:
city- for which to look up the contract broker.player- from whom the broker awaits d deliver.- Returns:
- optional of the broker, if one is found, empty otherwise.
-
hasContractBroker
boolean hasContractBroker(ICity city)
Check if there is a contract broker defined for the city. It does not matter, if the broker has an assigned player or not.- Parameters:
city- for which to check the contract broker- Returns:
- true if there is a contract broker defined for the city.
-
-