Class ProductionInfo


  • public class ProductionInfo
    extends java.lang.Object
    Container for information about production in a colony.
    • Field Detail

      • maximumProduction

        private java.util.List<AbstractGoods> maximumProduction
        The maximum production possible given unlimited input.
      • production

        private java.util.List<AbstractGoods> production
        The actual production.
      • maximumConsumption

        private java.util.List<AbstractGoods> maximumConsumption
        The maximum consumption possible given unlimited input.
      • consumption

        private java.util.List<AbstractGoods> consumption
        The actual consumption.
    • Constructor Detail

      • ProductionInfo

        public ProductionInfo()
    • Method Detail

      • getConsumption

        public final java.util.List<AbstractGoods> getConsumption()
      • setConsumption

        public final void setConsumption​(java.util.List<AbstractGoods> newConsumption)
      • addConsumption

        public void addConsumption​(AbstractGoods goods)
      • getProduction

        public final java.util.List<AbstractGoods> getProduction()
      • setProduction

        public final void setProduction​(java.util.List<AbstractGoods> newProduction)
      • addProduction

        public void addProduction​(AbstractGoods goods)
      • addProduction

        public void addProduction​(java.util.List<AbstractGoods> goods)
      • getMaximumProduction

        public final java.util.List<AbstractGoods> getMaximumProduction()
      • setMaximumProduction

        public final void setMaximumProduction​(java.util.List<AbstractGoods> newMaximumProduction)
      • addMaximumProduction

        public void addMaximumProduction​(AbstractGoods goods)
      • getProductionDeficit

        public java.util.List<AbstractGoods> getProductionDeficit()
        Get a list of the goods that are in production deficit, that is, those which are produced at less than their maximum possible rate.
        Returns:
        A list of AbstractGoods.
      • getConsumptionDeficit

        public java.util.List<AbstractGoods> getConsumptionDeficit()
        Get a list of the goods that are in consumption deficit, that is, those which are consumed at less than their maximum possible rate.
        Returns:
        A list of AbstractGoods.
      • atMaximumProduction

        public boolean atMaximumProduction()
        Does production equal maximum production?
        Returns:
        True if at maximum production.
      • getMaximumConsumption

        public final java.util.List<AbstractGoods> getMaximumConsumption()
      • setMaximumConsumption

        public final void setMaximumConsumption​(java.util.List<AbstractGoods> newMaximumConsumption)
      • addMaximumConsumption

        public void addMaximumConsumption​(AbstractGoods goods)
      • append

        private void append​(java.lang.StringBuilder result,
                            java.lang.String key,
                            java.util.List<AbstractGoods> list)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object