Package net.sf.freecol.common.model
Class ProductionInfo
- java.lang.Object
-
- net.sf.freecol.common.model.ProductionInfo
-
public class ProductionInfo extends java.lang.Object
Container for information about production in a colony.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AbstractGoods>
consumption
The actual consumption.private java.util.List<AbstractGoods>
maximumConsumption
The maximum consumption possible given unlimited input.private java.util.List<AbstractGoods>
maximumProduction
The maximum production possible given unlimited input.private java.util.List<AbstractGoods>
production
The actual production.
-
Constructor Summary
Constructors Constructor Description ProductionInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConsumption(AbstractGoods goods)
void
addMaximumConsumption(AbstractGoods goods)
void
addMaximumProduction(AbstractGoods goods)
void
addProduction(java.util.List<AbstractGoods> goods)
void
addProduction(AbstractGoods goods)
private void
append(java.lang.StringBuilder result, java.lang.String key, java.util.List<AbstractGoods> list)
boolean
atMaximumProduction()
Does production equal maximum production?java.util.List<AbstractGoods>
getConsumption()
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.java.util.List<AbstractGoods>
getMaximumConsumption()
java.util.List<AbstractGoods>
getMaximumProduction()
java.util.List<AbstractGoods>
getProduction()
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.void
setConsumption(java.util.List<AbstractGoods> newConsumption)
void
setMaximumConsumption(java.util.List<AbstractGoods> newMaximumConsumption)
void
setMaximumProduction(java.util.List<AbstractGoods> newMaximumProduction)
void
setProduction(java.util.List<AbstractGoods> newProduction)
java.lang.String
toString()
-
-
-
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.
-
-
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 classjava.lang.Object
-
-