Package net.sf.freecol.common.model
Interface TradeLocation
-
- All Known Implementing Classes:
Colony,Europe,IndianSettlement,ServerColony,ServerEurope,ServerIndianSettlement,TradeRouteStop
public interface TradeLocationA wrapper interface for a location that can be on a trade route.- See Also:
TradeRoute
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancanBeInput()Can a TradeLocation be set as the input location on a TradeRouteInputPanelintgetAvailableGoodsCount(GoodsType goodsType)Get the amount of a given goods type at this trade location.intgetExportAmount(GoodsType goodsType, int turns)Gets the amount of a given goods type that can be exported from this trade location after a given number of turns.intgetImportAmount(GoodsType goodsType, int turns)Gets the amount of a given goods type that can be imported to this trade location after a given number of turns.java.lang.StringgetLocationName(TradeLocation tradeLocation)Function for returning the name of a TradeLocationdefault javax.swing.JLabelgetNameAsJlabel()Get the name of this instance as a JLabel.
-
-
-
Method Detail
-
getAvailableGoodsCount
int getAvailableGoodsCount(GoodsType goodsType)
Get the amount of a given goods type at this trade location.- Parameters:
goodsType- TheGoodsTypeto check.- Returns:
- The amount of goods present.
-
getExportAmount
int getExportAmount(GoodsType goodsType, int turns)
Gets the amount of a given goods type that can be exported from this trade location after a given number of turns.- Parameters:
goodsType- TheGoodsTypeto check.turns- The number of turns before the goods is required.- Returns:
- The amount of goods to export.
-
getImportAmount
int getImportAmount(GoodsType goodsType, int turns)
Gets the amount of a given goods type that can be imported to this trade location after a given number of turns.- Parameters:
goodsType- TheGoodsTypeto check.turns- The number of turns before the goods will arrive.- Returns:
- The amount of goods to import.
-
getLocationName
java.lang.String getLocationName(TradeLocation tradeLocation)
Function for returning the name of a TradeLocation- Parameters:
tradeLocation- TheTradeLocationto return the name.- Returns:
- The name.
-
getNameAsJlabel
default javax.swing.JLabel getNameAsJlabel()
Get the name of this instance as a JLabel.- Returns:
- The
JLabelwith the result ofgetLocationName(TradeLocation)
-
canBeInput
default boolean canBeInput()
Can a TradeLocation be set as the input location on a TradeRouteInputPanel- Returns:
- True if possible, false by default.
-
-