Package me.hsgamer.hscore.builder
Class Builder<R,V>
java.lang.Object
me.hsgamer.hscore.builder.MassBuilder<AbstractMap.SimpleEntry<String,R>,V>
me.hsgamer.hscore.builder.Builder<R,V>
- Type Parameters:
R- the type of the raw valueV- the type of the final value
The simple builder
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuild the final value from a raw valueBuild the map of final valuesGet the registered mapRegister a new functionRegister a new build elementRegister a new functionRegister a new supplierMethods inherited from class me.hsgamer.hscore.builder.MassBuilder
build, buildAll, clear, getElements, register, remove
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
register
public MassBuilder<AbstractMap.SimpleEntry<String,R>, registerV> (Function<AbstractMap.SimpleEntry<String, R>, Optional<V>> element) Description copied from class:MassBuilderRegister a new build element- Overrides:
registerin classMassBuilder<AbstractMap.SimpleEntry<String,R>, V> - Parameters:
element- the element- Returns:
- this builder for chaining
-
register
Register a new function- Parameters:
biFunction- the functionname- the name of the modifier- Returns:
- the registered function element
-
register
Register a new function- Parameters:
function- the functionname- the name of the modifier- Returns:
- the registered function element
-
register
Register a new supplier- Parameters:
supplier- the suppliername- the name of the modifier- Returns:
- the registered function element
-
build
Build the final value from a raw value- Parameters:
name- the name or the alias of the functionrawValue- the raw value- Returns:
- the final value
-
build
Build the map of final values- Parameters:
rawMap- the map of raw values- Returns:
- the map of final values
-
getRegisteredMap
Get the registered map- Returns:
- the registered map
-