public class AutomatedTrading extends Object implements IAutomatedTrading
| Modifier and Type | Field and Description |
|---|---|
private HashMap<IWare,TradableWare> |
wares |
| Constructor and Description |
|---|
AutomatedTrading() |
| Modifier and Type | Method and Description |
|---|---|
javafx.beans.property.IntegerProperty |
amountProperty(IWare ware)
Get to the amount property of the tradeable ware.
|
int |
getAmount(IWare ware)
Retrieve the minimal amount of the ware that should be hold in the
storage.
|
int |
getPrice(IWare ware)
Retrieve the price up to which the ware is bought or the minimal price for which it is sold.
|
boolean |
isMovableToShip(IWare ware)
Check if this ware can be moved onto ships with automated trading routes
|
javafx.beans.property.BooleanProperty |
movableToShipProperty(IWare ware)
Get the movable to ship flag.
|
javafx.beans.property.IntegerProperty |
priceProperty(IWare ware)
Get the price property of the tradable ware.
|
void |
setMovableToShip(IWare ware,
boolean isMovable)
Set the movable flag
|
void |
setTradingType(IWare ware,
ETradeType tt)
Set the Trayding type.
|
javafx.beans.property.ObjectProperty<ETradeType> |
tradingTypeProperty(IWare ware)
Retrieve the trading type of the ware.
|
void |
updateAmount(IWare ware,
int difference)
Update the amount of ware
|
void |
updatePrice(IWare ware,
int difference)
Update the price of the ware
|
private HashMap<IWare,TradableWare> wares
public int getAmount(IWare ware)
IAutomatedTradinggetAmount in interface IAutomatedTradingware - to be holdpublic javafx.beans.property.IntegerProperty amountProperty(IWare ware)
IAutomatedTradingamountProperty in interface IAutomatedTradingpublic int getPrice(IWare ware)
IAutomatedTradinggetPrice in interface IAutomatedTradingware - to be bought or soldpublic javafx.beans.property.IntegerProperty priceProperty(IWare ware)
IAutomatedTradingpriceProperty in interface IAutomatedTradingpublic javafx.beans.property.ObjectProperty<ETradeType> tradingTypeProperty(IWare ware)
IAutomatedTradingtradingTypeProperty in interface IAutomatedTradingware - that should be checkedpublic boolean isMovableToShip(IWare ware)
IAutomatedTradingisMovableToShip in interface IAutomatedTradingware - that should be checkedpublic javafx.beans.property.BooleanProperty movableToShipProperty(IWare ware)
IAutomatedTradingmovableToShipProperty in interface IAutomatedTradingpublic void updateAmount(IWare ware, int difference)
IAutomatedTradingupdateAmount in interface IAutomatedTradingware - to be updateddifference - in the amountpublic void updatePrice(IWare ware, int difference)
IAutomatedTradingupdatePrice in interface IAutomatedTradingware - to be updateddifference - in the pricepublic void setTradingType(IWare ware, ETradeType tt)
IAutomatedTradingsetTradingType in interface IAutomatedTradingware - to be updatedpublic void setMovableToShip(IWare ware, boolean isMovable)
IAutomatedTradingsetMovableToShip in interface IAutomatedTradingware - to be updatedCopyright © 2011-2017 Sahits GmbH. All Rights Reserved.