Enum EWare
- java.lang.Object
-
- java.lang.Enum<EWare>
-
- ch.sahits.game.openpatrician.model.product.EWare
-
- All Implemented Interfaces:
IAmountable,ITradable,IWare,java.io.Serializable,java.lang.Comparable<EWare>
public enum EWare extends java.lang.Enum<EWare> implements IWare
Define the different type of wares that are produced and can be traded.- Author:
- Andi Hotz, (c) Sahits GmbH, 2011 Created on Nov 20, 2011
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEERBeer in barrelsBRICKBrick in burdenCLOTHCloth in barrelsFISHFish in burdenFISH_OILFish oil in barrelsFURFur in barrelsGRAINGrain in burdenHEMPHemp in burdenHONEYHoney in barrelsIRONIron in barrelsIRONOREIron ore in burdenLEATHERLeather in barrelsMEATMeat in burdenPITCHPitch in barrelsPOTTERYPottery in barrelsSALTSalt in barrelsSPICESpices in barrelsWINEWine in barrelsWOODWood in burdenWOOLWool in burden
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMinSellPriceModerate()Retrieve the moderate min sell price of the ware.intgetMinSellPriceOffensive()Retrieve the offensive min sell price of the ware.intgetMinSellPriceRabiat()Retrieve the rabiat max min sell for the ware.shortgetSizeAsBarrels()Retrieve the size of the ware converted into the smallest size unit (barrels)booleanisBarrelSizedWare()Check if the ware size is barrel or not.static EWarevalueOf(java.lang.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.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface ch.sahits.game.openpatrician.model.product.ITradable
getBuyCurve, getMarketSaturationForBuying, getMarketSaturationForSelling, getMaxValueBuy, getMaxValueSell, getMinValueBuy, getMinValueSell, getSellCurve, name
-
Methods inherited from interface ch.sahits.game.openpatrician.model.product.IWare
getAiMaxBuyAbsolute, getAiMaxBuyPercentage, getMaxBuyPriceModerate, getMaxBuyPriceOffensive, getMaxBuyPriceRabiat, getWareID
-
-
-
-
Enum Constant Detail
-
BEER
public static final EWare BEER
Beer in barrels
-
IRONORE
public static final EWare IRONORE
Iron ore in burden
-
IRON
public static final EWare IRON
Iron in barrels
-
FUR
public static final EWare FUR
Fur in barrels
-
FISH
public static final EWare FISH
Fish in burden
-
MEAT
public static final EWare MEAT
Meat in burden
-
GRAIN
public static final EWare GRAIN
Grain in burden
-
SPICE
public static final EWare SPICE
Spices in barrels
-
HEMP
public static final EWare HEMP
Hemp in burden
-
WOOD
public static final EWare WOOD
Wood in burden
-
HONEY
public static final EWare HONEY
Honey in barrels
-
POTTERY
public static final EWare POTTERY
Pottery in barrels
-
LEATHER
public static final EWare LEATHER
Leather in barrels
-
PITCH
public static final EWare PITCH
Pitch in barrels
-
SALT
public static final EWare SALT
Salt in barrels
-
FISH_OIL
public static final EWare FISH_OIL
Fish oil in barrels
-
CLOTH
public static final EWare CLOTH
Cloth in barrels
-
WINE
public static final EWare WINE
Wine in barrels
-
WOOL
public static final EWare WOOL
Wool in burden
-
BRICK
public static final EWare BRICK
Brick in burden
-
-
Method Detail
-
values
public static EWare[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EWare c : EWare.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EWare valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
isBarrelSizedWare
public final boolean isBarrelSizedWare()
Description copied from interface:IWareCheck if the ware size is barrel or not.- Specified by:
isBarrelSizedWarein interfaceIWare- Returns:
- true if the ware is stored in barrels
-
getMinSellPriceModerate
public int getMinSellPriceModerate()
Description copied from interface:IWareRetrieve the moderate min sell price of the ware.- Specified by:
getMinSellPriceModeratein interfaceIWare- Returns:
- minimum sell price
-
getMinSellPriceOffensive
public int getMinSellPriceOffensive()
Description copied from interface:IWareRetrieve the offensive min sell price of the ware.- Specified by:
getMinSellPriceOffensivein interfaceIWare- Returns:
- minimum sell price
-
getMinSellPriceRabiat
public int getMinSellPriceRabiat()
Description copied from interface:IWareRetrieve the rabiat max min sell for the ware.- Specified by:
getMinSellPriceRabiatin interfaceIWare- Returns:
- minimum sell price
-
getSizeAsBarrels
public final short getSizeAsBarrels()
Description copied from interface:IWareRetrieve the size of the ware converted into the smallest size unit (barrels)- Specified by:
getSizeAsBarrelsin interfaceIWare- Returns:
- size of the ware in barrles
-
-