Class WorkLocation.Suggestion

  • Enclosing class:
    WorkLocation

    public static class WorkLocation.Suggestion
    extends java.lang.Object
    Container class to suggest a better use of a unit.
    • Field Detail

      • descendingAmountComparator

        public static final java.util.Comparator<WorkLocation.Suggestion> descendingAmountComparator
      • oldType

        public final UnitType oldType
      • newType

        public final UnitType newType
      • goodsType

        public final GoodsType goodsType
      • amount

        public final int amount
    • Constructor Detail

      • Suggestion

        public Suggestion​(WorkLocation workLocation,
                          UnitType oldType,
                          UnitType newType,
                          GoodsType goodsType,
                          int amount)
        Suggest that work done by (optional) oldType would be better done by newType because it could produce amount more goodsType.
        Parameters:
        workLocation - The WorkLocation to add a unit to.
        oldType - The optional UnitType currently doing the work.
        newType - A new UnitType to do the work.
        goodsType - The GoodsType to produce.
        amount - The extra goods that would be produced if the suggestion is taken.
    • Method Detail

      • getNewUnitType

        public UnitType getNewUnitType()
      • getGoodsType

        public GoodsType getGoodsType()
      • getAmount

        public int getAmount()