Class UpgradableSetting
java.lang.Object
nl.sbdeveloper.vehiclesplus.api.vehicles.settings.UpgradableSetting
- All Implemented Interfaces:
Setting
A setting that is upgradable.
-
Constructor Summary
ConstructorsConstructorDescriptionUpgradableSetting
(Number base, boolean upgradable, Number max, Number step, double stepCost, String unit) Creates a newUpgradableSetting
instance.UpgradableSetting
(Number base, Number max, Number step, double stepCost, String unit) Construct a new upgradable setting. -
Method Summary
Modifier and TypeMethodDescriptiongetBase()
The base setting.getMax()
The maximal setting.getStep()
The step of one upgrade.double
The cost of one step.getUnit()
The unit of the setting.boolean
Is this setting upgradable?void
The base setting.void
The maximal setting.void
The step of one upgrade.void
setStepCost
(double stepCost) The cost of one step.void
The unit of the setting.void
setUpgradable
(boolean upgradable) Is this setting upgradable?toString()
-
Constructor Details
-
UpgradableSetting
Construct a new upgradable setting. The setting is upgradable by default.- Parameters:
base
- The base settingmax
- The maximal settingstep
- The step of one upgradestepCost
- The cost of one stepunit
- The unit of the setting
-
UpgradableSetting
public UpgradableSetting(Number base, boolean upgradable, Number max, Number step, double stepCost, String unit) Creates a newUpgradableSetting
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
-
getBase
The base setting. -
isUpgradable
public boolean isUpgradable()Is this setting upgradable? -
getMax
The maximal setting. -
getStep
The step of one upgrade. -
getStepCost
public double getStepCost()The cost of one step. -
getUnit
The unit of the setting. -
setBase
The base setting. -
setUpgradable
public void setUpgradable(boolean upgradable) Is this setting upgradable? -
setMax
The maximal setting. -
setStep
The step of one upgrade. -
setStepCost
public void setStepCost(double stepCost) The cost of one step. -
setUnit
The unit of the setting.
-