Class 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 Detail

      • TransferUtil

        public TransferUtil()
    • 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