Class RangeChoice.Builder
java.lang.Object
dev.wyck.worldgen.function.misc.RangeChoice.Builder
- Enclosing interface:
RangeChoice
Builder for
RangeChoice.- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the range choice density function.input(DensityFunction input) Sets the value to compare against the range.maxExclusive(double maxExclusive) Sets the upper bound of the range, exclusive.minInclusive(double minInclusive) Sets the lower bound of the range, inclusive.resourceKey(ResourceKey resourceKey) Sets the resource key.whenInRange(DensityFunction whenInRange) Sets the density function used when the input is inside the range.whenOutOfRange(DensityFunction whenOutOfRange) Sets the density function used when the input is outside the range.
-
Method Details
-
resourceKey
Sets the resource key.- Parameters:
resourceKey- the resource key- Returns:
- this builder
- Since:
- 3.0.0
-
input
Sets the value to compare against the range.- Parameters:
input- the input density function- Returns:
- this builder
- Since:
- 3.0.0
-
minInclusive
Sets the lower bound of the range, inclusive.- Parameters:
minInclusive- the minimum inclusive value- Returns:
- this builder
- Since:
- 3.0.0
-
maxExclusive
Sets the upper bound of the range, exclusive.- Parameters:
maxExclusive- the maximum exclusive value- Returns:
- this builder
- Since:
- 3.0.0
-
whenInRange
Sets the density function used when the input is inside the range.- Parameters:
whenInRange- the in-range density function- Returns:
- this builder
- Since:
- 3.0.0
-
whenOutOfRange
Sets the density function used when the input is outside the range.- Parameters:
whenOutOfRange- the out-of-range density function- Returns:
- this builder
- Since:
- 3.0.0
-
build
Builds the range choice density function.- Returns:
- the range choice density function
- Since:
- 3.0.0
-