public enum EWare extends Enum<EWare> implements IWare
| Enum Constant and Description |
|---|
BEER
Beer in barrels
|
BRICK
Brick in burden
|
CLOTH
Cloth in barrels
|
FISH
Fish in burden
|
FISH_OIL
Fish oil in barrels
|
FUR
Fur in barrels
|
GRAIN
Grain in burden
|
HEMP
Hemp in burden
|
HONEY
Honey in barrels
|
IRON
Iron in barrels
|
IRONORE
Iron ore in burden
|
LEATHER
Leather in barrels
|
MEAT
Meat in burden
|
PITCH
Pitch in barrels
|
POTTERY
Pottery in barrels
|
SALT
Salt in barrels
|
SPICE
Spices in barrels
|
WINE
Wine in barrels
|
WOOD
Wood in burden
|
WOOL
Wool in burden
|
| Modifier and Type | Field and Description |
|---|---|
private ComputablePrice |
computablePrice |
private int |
maxValueBuy |
private int |
maxValueSell |
private int |
minValueBuy |
private int |
minValueSell |
private int |
saturation |
private EWareSize |
size |
private String |
wareID |
| Modifier and Type | Method and Description |
|---|---|
int |
buyPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToBuy)
Compute the price for the wares to be bought.
|
int |
computeBuyPrice(int availableAmount,
int amountToBuy)
Deprecated.
|
int |
computePrice(javafx.beans.property.IntegerProperty available,
javafx.beans.binding.IntegerBinding amountToBuy) |
int |
computeSellPrice(int availableAmount,
int amountToSell)
Deprecated.
|
int |
getMarketSaturation()
Retrieve the amount of units which is considered infinite.
|
int |
getMaxValueBuy()
Retrieve the value that is maximal payed for one unit of this ware
if no ware is available.
|
int |
getMaxValueSell()
Retrieve the value that is to be maximally payed for one unit of this ware if no ware is available.
|
int |
getMinValueBuy()
Retrieve the value of the minimal payed sum for on unit if an infinitly amount
of the ware exists.
|
int |
getMinValueSell()
Retrieve the value that has to be minimally payed sum for one unit if infinitly amount of
wares exist.
|
short |
getSizeAsBarrels()
Retrieve the size of the ware converted into the smallest size unit (barrels)
|
String |
getWareID() |
boolean |
isBarrelSizedWare()
Check if the ware size is barrel or not.
|
int |
sellPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToSell)
Compute the price for the wares to be sold.
|
static EWare |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EWare[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EWare BEER
public static final EWare IRONORE
public static final EWare IRON
public static final EWare FUR
public static final EWare FISH
public static final EWare MEAT
public static final EWare GRAIN
public static final EWare SPICE
public static final EWare HEMP
public static final EWare WOOD
public static final EWare HONEY
public static final EWare POTTERY
public static final EWare LEATHER
public static final EWare PITCH
public static final EWare SALT
public static final EWare FISH_OIL
public static final EWare CLOTH
public static final EWare WINE
public static final EWare WOOL
public static final EWare BRICK
private final EWareSize size
private final int maxValueBuy
private final int minValueBuy
private final int maxValueSell
private final int minValueSell
private final int saturation
private final String wareID
private final ComputablePrice computablePrice
public static EWare[] values()
for (EWare c : EWare.values()) System.out.println(c);
public static EWare valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final boolean isBarrelSizedWare()
IWareisBarrelSizedWare in interface IWarepublic final short getSizeAsBarrels()
IWaregetSizeAsBarrels in interface IWare@Deprecated public int computeSellPrice(int availableAmount, int amountToSell)
IWareIWare.getMaxValueBuy()
and approaches IWare.getMinValueBuy() assymtotically.computeSellPrice in interface IWareavailableAmount - Amount of the ware that is availableamountToSell - Amount of ware that is to be sold@Deprecated public int computeBuyPrice(int availableAmount, int amountToBuy)
IWareIWare.getMaxValueBuy()
plus a ware specific constant.computeBuyPrice in interface IWareavailableAmount - Amount of the ware that is availableamountToBuy - Amount of ware that is to be boughtpublic int sellPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToSell)
IWareIWare.getMaxValueBuy()
and approaches IWare.getMinValueBuy() asymtotically.public int buyPrice(javafx.beans.property.IntegerProperty availableAmount,
javafx.beans.binding.IntegerBinding amountToBuy)
IWareIWare.getMaxValueBuy()
plus a ware specific constant.public int computePrice(javafx.beans.property.IntegerProperty available,
javafx.beans.binding.IntegerBinding amountToBuy)
public int getMaxValueBuy()
IWaregetMaxValueBuy in interface IWarepublic int getMaxValueSell()
IWaregetMaxValueSell in interface IWarepublic int getMinValueSell()
IWaregetMinValueSell in interface IWarepublic int getMinValueBuy()
IWaregetMinValueBuy in interface IWarepublic int getMarketSaturation()
IWaregetMarketSaturation in interface IWarepublic String getWareID()
Copyright © 2011-2015 Sahits GmbH. All Rights Reserved.