Class RequiredWareCityStorage


  • public class RequiredWareCityStorage
    extends java.lang.Object
    Class to store the required amount in to facilitate the binding. Based on the amount in storage and in the city together with the required amount bindings for the buy amount and buy price is calculated, along with the possibility that not enough wares can be purchased.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2017 Created on Sep 16, 2017
    • Constructor Summary

      Constructors 
      Constructor Description
      RequiredWareCityStorage​(int needed, javafx.beans.property.IntegerProperty inStorageAmount, javafx.beans.property.IntegerProperty inCityAmount, ch.sahits.game.openpatrician.model.product.IWare ware, ch.sahits.game.openpatrician.model.product.ComputablePriceV2 computablePrice)  
    • Constructor Detail

      • RequiredWareCityStorage

        public RequiredWareCityStorage​(int needed,
                                       javafx.beans.property.IntegerProperty inStorageAmount,
                                       javafx.beans.property.IntegerProperty inCityAmount,
                                       ch.sahits.game.openpatrician.model.product.IWare ware,
                                       ch.sahits.game.openpatrician.model.product.ComputablePriceV2 computablePrice)
    • Method Detail

      • requiredProperty

        public javafx.beans.property.IntegerProperty requiredProperty()
      • setRequired

        public void setRequired​(int required)
      • inStorageProperty

        public javafx.beans.property.IntegerProperty inStorageProperty()
      • inCityProperty

        public javafx.beans.property.IntegerProperty inCityProperty()
      • getBuyAmount

        public java.lang.Number getBuyAmount()
      • buyAmountProperty

        public javafx.beans.binding.IntegerBinding buyAmountProperty()
      • getBuyPrice

        public java.lang.Number getBuyPrice()
      • buyPriceProperty

        public javafx.beans.binding.IntegerBinding buyPriceProperty()
      • getCanBuy

        public java.lang.Boolean getCanBuy()
      • canBuyProperty

        public javafx.beans.binding.BooleanBinding canBuyProperty()