Class AdditionGenerator
java.lang.Object
wbs.utils.util.providers.generator.num.DoubleGenerator
wbs.utils.util.providers.generator.num.FunctionalGenerator
wbs.utils.util.providers.generator.num.AdditionGenerator
- All Implemented Interfaces:
Provider,Refreshable
A functional generator that takes any number of NumProviders and
returns the sum
-
Field Summary
Fields inherited from class wbs.utils.util.providers.generator.num.FunctionalGenerator
args -
Constructor Summary
ConstructorsConstructorDescriptionAdditionGenerator(double... args) AdditionGenerator(List<Double> args) AdditionGenerator(org.bukkit.configuration.ConfigurationSection section, WbsSettings settings, String directory) Create this generator from a ConfigurationSection, logging errors in the given settingsClone constructor.AdditionGenerator(NumProvider... args) -
Method Summary
Modifier and TypeMethodDescriptionclone()protected doubleGenerate a new value to override the current oneMethods inherited from class wbs.utils.util.providers.generator.num.FunctionalGenerator
refreshInternal, writeToConfigMethods inherited from class wbs.utils.util.providers.generator.num.DoubleGenerator
getValue, refresh
-
Constructor Details
-
AdditionGenerator
- Parameters:
args- The values (or value providers) to operate on.
-
AdditionGenerator
- Parameters:
args- The values (or value providers) to operate on.
-
AdditionGenerator
public AdditionGenerator(double... args) - Parameters:
args- The values (or value providers) to operate on.
-
AdditionGenerator
Clone constructor.- Parameters:
clone- The object to clone from.
-
AdditionGenerator
public AdditionGenerator(org.bukkit.configuration.ConfigurationSection section, WbsSettings settings, String directory) Create this generator from a ConfigurationSection, logging errors in the given settings- Parameters:
section- The section where this generator is definedsettings- The settings to log errors againstdirectory- The path taken through the config to get to this point, for logging purposes
-
-
Method Details
-
getNewValue
protected double getNewValue()Description copied from class:DoubleGeneratorGenerate a new value to override the current one- Specified by:
getNewValuein classDoubleGenerator- Returns:
- The new value
-
clone
- Specified by:
clonein classDoubleGenerator
-