Interface TradeLocation

    • Method Detail

      • getAvailableGoodsCount

        int getAvailableGoodsCount​(GoodsType goodsType)
        Get the amount of a given goods type at this trade location.
        Parameters:
        goodsType - The GoodsType to check.
        Returns:
        The amount of goods present.
      • getExportAmount

        int getExportAmount​(GoodsType goodsType,
                            int turns)
        Gets the amount of a given goods type that can be exported from this trade location after a given number of turns.
        Parameters:
        goodsType - The GoodsType to check.
        turns - The number of turns before the goods is required.
        Returns:
        The amount of goods to export.
      • getImportAmount

        int getImportAmount​(GoodsType goodsType,
                            int turns)
        Gets the amount of a given goods type that can be imported to this trade location after a given number of turns.
        Parameters:
        goodsType - The GoodsType to check.
        turns - The number of turns before the goods will arrive.
        Returns:
        The amount of goods to import.
      • getLocationName

        java.lang.String getLocationName​(TradeLocation tradeLocation)
        Function for returning the name of a TradeLocation
        Parameters:
        tradeLocation - The TradeLocation to return the name.
        Returns:
        The name.
      • getNameAsJlabel

        default javax.swing.JLabel getNameAsJlabel()
        Get the name of this instance as a JLabel.
        Returns:
        The JLabel with the result of getLocationName(TradeLocation)
      • canBeInput

        default boolean canBeInput()
        Can a TradeLocation be set as the input location on a TradeRouteInputPanel
        Returns:
        True if possible, false by default.