Class ProductionChain


  • @Service
    @Lazy
    @DependentInitialisation(StartNewGameBean.class)
    public class ProductionChain
    extends java.lang.Object
    Model for the production chain. All values refer to one workshop with peak efficiency and efficient production.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2016 Created on May 14, 2016
    • Field Detail

      • properties

        private java.util.Properties properties
    • Constructor Detail

      • ProductionChain

        public ProductionChain()
    • Method Detail

      • init

        @PostConstruct
        void init()
           throws java.io.IOException
        Throws:
        java.io.IOException
      • getProduction

        public double getProduction​(IWare ware)
      • getRequiredWares

        public java.util.List<IWare> getRequiredWares​(IWare wareToBeProduced)
      • getRequiredAmount

        public double getRequiredAmount​(IWare wareToBeProduced,
                                        IWare requiredWare)
        Get the required amount of requiredWare to produce wareToBeProduced within a week.
        Parameters:
        wareToBeProduced - ware that should be produced
        requiredWare - ware that is required
        Returns:
        amount of requiredWare to produce wareToBeProduced within a week.
      • getWaresWithProductionChain

        public java.util.List<IWare> getWaresWithProductionChain()
        Retrieve all wares that require other wares to be produced.
        Returns:
        List of wares that are produced in a production chain.