Class TransferUtil
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.service.TransferUtil
-
@Component @Lazy @DependentInitialisation(StartNewGameBean.class) public class TransferUtil extends java.lang.Object
This class provides some utility functions that are required by different UIs.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Dec 22, 2013
-
-
Constructor Summary
Constructors Constructor Description TransferUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calculateAvailableAmount(ETransferAmount movableAmount, int maxAmount)
Calculate the available amount to be transfered.int
calculateAvailableAmount(javafx.beans.property.ObjectProperty<ETransferAmount> movableAmount, int maxAmount)
Calculate the available amount to be transfered.
-
-
-
Method Detail
-
calculateAvailableAmount
public int calculateAvailableAmount(javafx.beans.property.ObjectProperty<ETransferAmount> movableAmount, int maxAmount)
Calculate the available amount to be transfered.- Parameters:
maxAmount
- maximal amount that is stored. This is the amount that is the upper bound, which can be transferred.movableAmount
- size type indicating how much should be moved.- Returns:
- amount that can be transferred
-
calculateAvailableAmount
public int calculateAvailableAmount(ETransferAmount movableAmount, int maxAmount)
Calculate the available amount to be transfered.- Parameters:
maxAmount
- maximal amount that is stored. This is the amount that is the upper bound, which can be transferred.movableAmount
- size type indicating how much should be moved.- Returns:
- amount that can be transferred
-
-