Package com.demonwav.hypo.core
Class HypoConfig.Builder
java.lang.Object
com.demonwav.hypo.core.HypoConfig.Builder
- Enclosing class:
- HypoConfig
Builder class for creating new instances of
HypoConfig. Create new instances of this builder with
HypoConfig.builder().
This class is structured as the write-only version of HypoConfig, which is read-only.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Use the current values of this builder to create a new instance ofHypoConfigand return it.withDecorator(@NotNull Function<ClassDataProvider,ClassDataDecorator> decorator)Set thedecoratorconstructor to use forClassDataProvider.setDecorator(ClassDataDecorator).withParallelism(int parallelism)Set the level of parallelism to use for Hypo executions.
-
Constructor Details
-
Builder
Builder()Constructor forHypoConfig.Builder. UseHypoConfig.builder()instead.
-
-
Method Details
-
withParallelism
@CanIgnoreReturnValue @Contract(value="_ -> this", mutates="this") @NotNull public @NotNull HypoConfig.Builder withParallelism(int parallelism)Set the level of parallelism to use for Hypo executions.Defaults to
-1, which means to useRuntime.availableProcessors().- Parameters:
parallelism- The level of parallelism to use for Hypo executions.- Returns:
thisfor chaining.
-
withDecorator
@CanIgnoreReturnValue @Contract(value="_ -> this", mutates="this") @NotNull public @NotNull HypoConfig.Builder withDecorator(@NotNull @NotNull Function<ClassDataProvider,ClassDataDecorator> decorator)Set thedecoratorconstructor to use forClassDataProvider.setDecorator(ClassDataDecorator).Defaults to
DefaultClassDataDecorator::new.- Parameters:
decorator- Thedecoratorconstructor to use.- Returns:
thisfor chaining.
-
build
@CanIgnoreReturnValue @Contract(value="-> new", pure=true) @NotNull public @NotNull HypoConfig build()Use the current values of this builder to create a new instance ofHypoConfigand return it.- Returns:
- The new instance of
HypoConfigusing the value set in this builder.
-