Package com.booksaw.betterTeams.team
Class IntTeamComponent
java.lang.Object
com.booksaw.betterTeams.team.IntTeamComponent
- All Implemented Interfaces:
TeamComponent<Integer>
,VariableTeamComponent<Integer>
- Direct Known Subclasses:
ScoreComponent
public abstract class IntTeamComponent
extends Object
implements TeamComponent<Integer>, VariableTeamComponent<Integer>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add the given amount to this variablevoid
Divide this variable by the given amountget()
abstract StoredTeamValue
void
load
(TeamStorage section) Load the value stored in the config into this componentvoid
Multiply this variable by the given amountvoid
save
(TeamStorage section) Store the loaded value to the configuration sectionvoid
void
Subtract the given amount from this variable
-
Field Details
-
value
-
-
Constructor Details
-
IntTeamComponent
public IntTeamComponent()
-
-
Method Details
-
get
- Specified by:
get
in interfaceTeamComponent<Integer>
- Returns:
- The stored value
-
set
- Specified by:
set
in interfaceTeamComponent<Integer>
- Parameters:
value
- Set what the currently stored value is
-
save
Description copied from interface:TeamComponent
Store the loaded value to the configuration section- Specified by:
save
in interfaceTeamComponent<Integer>
- Parameters:
section
- The storage class where all team storage takes place
-
load
Description copied from interface:TeamComponent
Load the value stored in the config into this component- Specified by:
load
in interfaceTeamComponent<Integer>
- Parameters:
section
- The configuration section where all the team data is stored
-
getSectionHeading
-
add
Description copied from interface:VariableTeamComponent
Add the given amount to this variable- Specified by:
add
in interfaceVariableTeamComponent<Integer>
- Parameters:
amount
- The amount to add
-
sub
Description copied from interface:VariableTeamComponent
Subtract the given amount from this variable- Specified by:
sub
in interfaceVariableTeamComponent<Integer>
- Parameters:
amount
- The amount to subtract
-
mult
Description copied from interface:VariableTeamComponent
Multiply this variable by the given amount- Specified by:
mult
in interfaceVariableTeamComponent<Integer>
- Parameters:
amount
- The scaler
-
div
Description copied from interface:VariableTeamComponent
Divide this variable by the given amount- Specified by:
div
in interfaceVariableTeamComponent<Integer>
- Parameters:
amount
- The scalar
-