Package net.sf.freecol.common.model
Class WorkLocation.Suggestion
- java.lang.Object
-
- net.sf.freecol.common.model.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 Summary
Fields Modifier and Type Field Description int
amount
static java.util.Comparator<WorkLocation.Suggestion>
descendingAmountComparator
GoodsType
goodsType
UnitType
newType
UnitType
oldType
WorkLocation
workLocation
-
Constructor Summary
Constructors Constructor Description Suggestion(WorkLocation workLocation, UnitType oldType, UnitType newType, GoodsType goodsType, int amount)
Suggest that work done by (optional)oldType
would be better done bynewType
because it could produceamount
moregoodsType
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAmount()
GoodsType
getGoodsType()
UnitType
getNewUnitType()
-
-
-
Field Detail
-
descendingAmountComparator
public static final java.util.Comparator<WorkLocation.Suggestion> descendingAmountComparator
-
workLocation
public final WorkLocation workLocation
-
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 bynewType
because it could produceamount
moregoodsType
.- Parameters:
workLocation
- TheWorkLocation
to add a unit to.oldType
- The optionalUnitType
currently doing the work.newType
- A newUnitType
to do the work.goodsType
- TheGoodsType
to produce.amount
- The extra goods that would be produced if the suggestion is taken.
-
-