Class SailorsState

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javafx.beans.property.IntegerProperty nbSailors  
      private javafx.beans.property.BooleanProperty present  
    • Constructor Summary

      Constructors 
      Constructor Description
      SailorsState()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void fire()
      Fire a single sailor.
      int getNumberOfSailors()
      Retrieve the numbers of sailors present
      void hire()
      Hire a single sailor.
      boolean isPresent()
      Indicates if sailors are present
      javafx.beans.property.IntegerProperty numberOfSailorsProperty()  
      void setNumberOfSailors​(int number)
      Set the number of sailors
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • nbSailors

        private final javafx.beans.property.IntegerProperty nbSailors
      • present

        private final javafx.beans.property.BooleanProperty present
    • Constructor Detail

      • SailorsState

        public SailorsState()
    • Method Detail

      • getNumberOfSailors

        public int getNumberOfSailors()
        Description copied from interface: ISailors
        Retrieve the numbers of sailors present
        Specified by:
        getNumberOfSailors in interface ISailors
        Returns:
        number of sailors
      • hire

        public void hire()
        Description copied from interface: ISailorState
        Hire a single sailor.
        Specified by:
        hire in interface ISailorState
      • fire

        public void fire()
        Description copied from interface: ISailorState
        Fire a single sailor.
        Specified by:
        fire in interface ISailorState
      • isPresent

        public boolean isPresent()
        Description copied from interface: ISailors
        Indicates if sailors are present
        Specified by:
        isPresent in interface ISailors
        Returns:
        true if there are sailors.