Interface ITavernPerson

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void arrive()
      Person arrives in the tavern.
      java.time.LocalDateTime getArrivalDate()
      Set the arrival date in the tavern
      int getMaxDaysAbsent()
      Maximum number of days not present in the tavern.
      int getMaxDaysPresent()
      Retrieve the max number of days present in the tavern.
      int getNumberOfDaysSinceArrival()
      Compute the days of absence since the last arrival, if the person is not present.
      boolean isPresent()
      Flag indicating if the person is present in the tavern.
      javafx.beans.property.BooleanProperty isPresentProperty()
      Property defining the presence/absence state.
      void leave()
      Person leaves the tavern.
      void setCity​(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.