Interface ITavernPerson
-
- All Superinterfaces:
IPerson
- All Known Subinterfaces:
ch.sahits.game.openpatrician.model.people.IBasePatrol,IBuyer,IConcurrent,ICourier,IEscorte,IFugitive,IInformant,IPatrol,IPirate,IPirateHunter,ISideRoomPerson,ISmuggler,IThieve,ITrader,ITransportTrader,ITraveler,ITreasureMapOwner,IWarehouseTenant
- All Known Implementing Classes:
BasePatrolState,BaseTavernPerson,BuyerState,ConcurrentState,CourierState,EscorteeState,FugitiveState,InformantState,PatrolState,PirateHunterState,SmugglerState,TavernPirateState,ThieveState,TraderState,TransportTraderState,TravelerState,TreasureMapOwnerState,WarehouseTenant
public interface ITavernPerson extends IPerson
Interface describing a person in the tavern, who is only part time present- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Jan 20, 2013
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidarrive()Person arrives in the tavern.java.time.LocalDateTimegetArrivalDate()Set the arrival date in the tavernintgetMaxDaysAbsent()Maximum number of days not present in the tavern.intgetMaxDaysPresent()Retrieve the max number of days present in the tavern.intgetNumberOfDaysSinceArrival()Compute the days of absence since the last arrival, if the person is not present.booleanisPresent()Flag indicating if the person is present in the tavern.javafx.beans.property.BooleanPropertyisPresentProperty()Property defining the presence/absence state.voidleave()Person leaves the tavern.voidsetCity(ICity city)Set the city of the tavern in which the person is located.
-
-
-
Method Detail
-
leave
void leave()
Person leaves the tavern.
-
arrive
void arrive()
Person arrives in the tavern.
-
getNumberOfDaysSinceArrival
int getNumberOfDaysSinceArrival()
Compute the days of absence since the last arrival, if the person is not present.- Returns:
- number of days the person is in the tavern
-
isPresent
boolean isPresent()
Flag indicating if the person is present in the tavern.- Returns:
- true if the person is present.
-
isPresentProperty
javafx.beans.property.BooleanProperty isPresentProperty()
Property defining the presence/absence state.- Returns:
- boolean proerty indicating the presence in the tavern.
-
getMaxDaysAbsent
int getMaxDaysAbsent()
Maximum number of days not present in the tavern.- Returns:
- max number of absent days.
-
getMaxDaysPresent
int getMaxDaysPresent()
Retrieve the max number of days present in the tavern.- Returns:
- max number of present days in the tavern
-
getArrivalDate
java.time.LocalDateTime getArrivalDate()
Set the arrival date in the tavern- Returns:
- date when the person becomes present.
-
setCity
void setCity(ICity city)
Set the city of the tavern in which the person is located.- Parameters:
city- in which the tavern is located.
-
-