Class Storage

  • All Implemented Interfaces:
    IStorage

    public class Storage
    extends java.lang.Object
    implements IStorage
    • Field Detail

      • timerEventBus

        @Autowired
        @Qualifier("timerEventBus")
        private com.google.common.eventbus.AsyncEventBus timerEventBus
      • owner

        private final IPlayer owner
      • city

        private final ICity city
      • rentOutStorage

        private javafx.beans.property.IntegerProperty rentOutStorage
      • nbGuards

        private javafx.beans.property.IntegerProperty nbGuards
    • Constructor Detail

    • Method Detail

      • init

        @PostConstruct
        private void init()
      • destroy

        @PreDestroy
        public void destroy()
      • getNbWareHouses

        private int getNbWareHouses()
        Retrieve the number of warehouses
        Returns:
        number of warehouses.
      • rentOutStorageProperty

        public javafx.beans.property.IntegerProperty rentOutStorageProperty()
        Description copied from interface: IStorage
        Retrieve the amount of storage in barrels that is rented by someone else
        Specified by:
        rentOutStorageProperty in interface IStorage
        Returns:
        integer property for rented out storage
      • updateRendedSpace

        public void updateRendedSpace​(int nbBarrels)
        Description copied from interface: IStorage
        Update the rented out space
        Specified by:
        updateRendedSpace in interface IStorage
        Parameters:
        nbBarrels - rented out space in barrels
      • costsPerDayBinding

        public javafx.beans.binding.IntegerBinding costsPerDayBinding()
        Description copied from interface: IStorage
        Retrieve the daily cost for rent storage
        Specified by:
        costsPerDayBinding in interface IStorage
        Returns:
        integer binding of daily costs for renting additional space.
      • numberGuardsProperty

        public javafx.beans.property.IntegerProperty numberGuardsProperty()
        Description copied from interface: IStorage
        Retrieve the number of guards
        Specified by:
        numberGuardsProperty in interface IStorage
        Returns:
        IntegerProperty for number of guards.
      • guardCostsPerDayBinding

        public javafx.beans.binding.IntegerBinding guardCostsPerDayBinding()
        Description copied from interface: IStorage
        Retrieve the costs for the guards
        Specified by:
        guardCostsPerDayBinding in interface IStorage
        Returns:
        IntegerBinding for guard salary per day.
      • securityLevelBinding

        public javafx.beans.binding.ObjectBinding<ELevel> securityLevelBinding()
        Description copied from interface: IStorage
        Retrieve the security level
        Specified by:
        securityLevelBinding in interface IStorage
        Returns:
        object binding of security level
      • internalSecurityLevelCalculation

        private ELevel internalSecurityLevelCalculation()
      • updateGuardsNumber

        public void updateGuardsNumber​(int update)
        Description copied from interface: IStorage
        Increase or decrease the number of guards
        Specified by:
        updateGuardsNumber in interface IStorage
        Parameters:
        update - delta in the number of guards.