Class UpgradableSetting

java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.settings.UpgradableSetting
All Implemented Interfaces:
Setting

public class UpgradableSetting extends Object implements Setting
A setting that is upgradable.
  • Constructor Details

    • UpgradableSetting

      public UpgradableSetting(Number base, Number max, Number step, double stepCost, String unit)
      Construct a new upgradable setting. The setting is upgradable by default.
      Parameters:
      base - The base setting
      max - The maximal setting
      step - The step of one upgrade
      stepCost - The cost of one step
      unit - The unit of the setting
    • UpgradableSetting

      public UpgradableSetting(Number base, boolean upgradable, Number max, Number step, double stepCost, String unit)
      Creates a new UpgradableSetting instance.
      Parameters:
      base - The base setting.
      upgradable - Is this setting upgradable?
      max - The maximal setting.
      step - The step of one upgrade.
      stepCost - The cost of one step.
      unit - The unit of the setting.
    • UpgradableSetting

      public UpgradableSetting()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBase

      public Number getBase()
      The base setting.
    • isUpgradable

      public boolean isUpgradable()
      Is this setting upgradable?
    • getMax

      public Number getMax()
      The maximal setting.
    • getStep

      public Number getStep()
      The step of one upgrade.
    • getStepCost

      public double getStepCost()
      The cost of one step.
    • getUnit

      public String getUnit()
      The unit of the setting.
    • setBase

      public void setBase(Number base)
      The base setting.
    • setUpgradable

      public void setUpgradable(boolean upgradable)
      Is this setting upgradable?
    • setMax

      public void setMax(Number max)
      The maximal setting.
    • setStep

      public void setStep(Number step)
      The step of one upgrade.
    • setStepCost

      public void setStepCost(double stepCost)
      The cost of one step.
    • setUnit

      public void setUnit(String unit)
      The unit of the setting.