Class BasePriceCalulation
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.product.BasePriceCalulation
-
- All Implemented Interfaces:
IPriceCalculationV2
- Direct Known Subclasses:
BezierPriceCalculation
,SimplePriceCalculation
public abstract class BasePriceCalulation extends java.lang.Object implements IPriceCalculationV2
- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Aug 14, 2016
-
-
Constructor Summary
Constructors Constructor Description BasePriceCalulation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getMaxValue(ITradable tradable, boolean buy)
Retreive the maximal value from tradable dependent if we are buying or selling.protected int
getMinValue(ITradable tradable, boolean buy)
Retreive the minimal value from tradable dependent if we are buying or selling.protected int
getSaturation(ITradable tradable, boolean buy)
Retreive the saturation value from tradable dependent if we are buying or selling.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.product.IPriceCalculationV2
computePrice
-
-
-
-
Method Detail
-
getMinValue
protected int getMinValue(ITradable tradable, boolean buy)
Retreive the minimal value from tradable dependent if we are buying or selling.- Parameters:
tradable
- holding the min valuebuy
- flag indicating if we are buying or selling- Returns:
- appropriate value for min based on the
buy
flag.
-
getMaxValue
protected int getMaxValue(ITradable tradable, boolean buy)
Retreive the maximal value from tradable dependent if we are buying or selling.- Parameters:
tradable
- holding the max valuebuy
- flag indicating if we are buying or selling- Returns:
- appropriate value for max based on the
buy
flag.
-
getSaturation
protected int getSaturation(ITradable tradable, boolean buy)
Retreive the saturation value from tradable dependent if we are buying or selling.- Parameters:
tradable
- holding the max valuebuy
- flag indicating if we are buying or selling- Returns:
- appropriate value for saturation based on the
buy
flag.
-
-