public class BaseTavernPerson extends Object implements ITavernPerson
| Type | Property and Description |
|---|---|
javafx.beans.property.BooleanProperty |
isPresent
Gets the value of the property presentProperty.
|
| Modifier and Type | Field and Description |
|---|---|
private java.time.LocalDateTime |
arrivalDate
Arrival date of the person in the tavern.
|
private ICity |
city |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private Date |
date |
private javafx.beans.property.BooleanProperty |
isPresent
Indicating if the person is currently present
|
private int |
maxDaysAbsent |
private int |
maxDaysPresent |
private Random |
rnd |
| Constructor and Description |
|---|
BaseTavernPerson() |
| Modifier and Type | Method and Description |
|---|---|
void |
arrive()
Person arrives in the tavern.
|
int |
getNumberOfDaysSinceArrival()
Compute the days of absence since the last arrival,
if the person is not present.
|
private void |
initArival() |
boolean |
isPresent() |
javafx.beans.property.BooleanProperty |
isPresentProperty()
Gets the value of the property presentProperty.
|
void |
leave()
Person leaves the tavern
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArrivalDate, getMaxDaysAbsent, getMaxDaysPresent, setCitypublic javafx.beans.property.BooleanProperty isPresentProperty
isPresentProperty in interface ITavernPersonprivate java.time.LocalDateTime arrivalDate
isPresent is false
for the first time@Value(value="${tavern.person.presence.max}")
private int maxDaysPresent
@Value(value="${tavern.person.absence.max}")
private int maxDaysAbsent
private javafx.beans.property.BooleanProperty isPresent
@Autowired private Date date
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
private ICity city
@Autowired private Random rnd
@PostConstruct private void initArival()
public boolean isPresent()
isPresent in interface ITavernPersonpublic javafx.beans.property.BooleanProperty isPresentProperty()
isPresentProperty in interface ITavernPersonpublic final void arrive()
arrive in interface ITavernPersonpublic final void leave()
leave in interface ITavernPersonpublic int getNumberOfDaysSinceArrival()
ITavernPersongetNumberOfDaysSinceArrival in interface ITavernPersonCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.