|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.server.ai.ProductionCache.Entry
public class ProductionCache.Entry
An Entry in the production cache represents a single unit producing goods in a certain work location. It records information on the type and amount of goods produced, as well as on whether the unit is an expert for producing this type of goods, or can be upgraded to one.
| Field Summary | |
|---|---|
private GoodsType |
goodsType
|
private boolean |
isExpert
|
private boolean |
isOtherExpert
|
private int |
production
|
private Unit |
unit
|
private boolean |
unitUpgrades
|
private boolean |
unitUpgradesToExpert
|
private WorkLocation |
workLocation
|
| Constructor Summary | |
|---|---|
ProductionCache.Entry(GoodsType g,
WorkLocation w,
Unit u)
|
|
| Method Summary | |
|---|---|
GoodsType |
getGoodsType()
Returns the type of goods produced. |
int |
getProduction()
Returns the amount of goods produced. |
Unit |
getUnit()
Returns a unit producing goods in this work location. |
WorkLocation |
getWorkLocation()
Returns the work location where goods are produced. |
boolean |
isExpert()
Returns true if the unit is an expert for producing the type of goods selected. |
boolean |
isOtherExpert()
Returns true if the unit is an expert for producing a type of goods other than the one selected. |
java.lang.String |
toString()
Returns a string representation of this entry. |
boolean |
unitUpgrades()
Returns true if the unit can be upgraded through experience. |
boolean |
unitUpgradesToExpert()
Returns true if the unit can be upgraded to an expert for producing the type of goods selected through experience. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final GoodsType goodsType
private final WorkLocation workLocation
private final Unit unit
private final int production
private boolean isExpert
private boolean isOtherExpert
private boolean unitUpgrades
private boolean unitUpgradesToExpert
| Constructor Detail |
|---|
public ProductionCache.Entry(GoodsType g,
WorkLocation w,
Unit u)
| Method Detail |
|---|
public GoodsType getGoodsType()
GoodsType valuepublic WorkLocation getWorkLocation()
WorkLocation valuepublic Unit getUnit()
Unit valuepublic int getProduction()
int valuepublic boolean isExpert()
boolean valuepublic boolean isOtherExpert()
boolean valuepublic boolean unitUpgrades()
boolean valuepublic boolean unitUpgradesToExpert()
boolean valuepublic java.lang.String toString()
toString in class java.lang.ObjectString value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||