Package com.booksaw.betterTeams.team
Class DoubleTeamComponent
java.lang.Object
com.booksaw.betterTeams.team.DoubleTeamComponent
- All Implemented Interfaces:
TeamComponent<Double>,VariableTeamComponent<Double>
- Direct Known Subclasses:
MoneyComponent
public abstract class DoubleTeamComponent
extends Object
implements TeamComponent<Double>, VariableTeamComponent<Double>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the given amount to this variablevoidDivide this variable by the given amountget()abstract StoredTeamValuevoidload(TeamStorage section) Load the value stored in the config into this componentvoidMultiply this variable by the given amountvoidsave(TeamStorage storage) Store the loaded value to the configuration sectionvoidvoidSubtract the given amount from this variable
-
Field Details
-
value
protected double value
-
-
Constructor Details
-
DoubleTeamComponent
public DoubleTeamComponent()
-
-
Method Details
-
add
Description copied from interface:VariableTeamComponentAdd the given amount to this variable- Specified by:
addin interfaceVariableTeamComponent<Double>- Parameters:
amount- The amount to add
-
sub
Description copied from interface:VariableTeamComponentSubtract the given amount from this variable- Specified by:
subin interfaceVariableTeamComponent<Double>- Parameters:
amount- The amount to subtract
-
mult
Description copied from interface:VariableTeamComponentMultiply this variable by the given amount- Specified by:
multin interfaceVariableTeamComponent<Double>- Parameters:
amount- The scaler
-
div
Description copied from interface:VariableTeamComponentDivide this variable by the given amount- Specified by:
divin interfaceVariableTeamComponent<Double>- Parameters:
amount- The scalar
-
get
- Specified by:
getin interfaceTeamComponent<Double>- Returns:
- The stored value
-
set
- Specified by:
setin interfaceTeamComponent<Double>- Parameters:
value- Set what the currently stored value is
-
load
Description copied from interface:TeamComponentLoad the value stored in the config into this component- Specified by:
loadin interfaceTeamComponent<Double>- Parameters:
section- The configuration section where all the team data is stored
-
save
Description copied from interface:TeamComponentStore the loaded value to the configuration section- Specified by:
savein interfaceTeamComponent<Double>- Parameters:
storage- The storage class where all team storage takes place
-
getSectionHeading
-