Class Options.Builder
java.lang.Object
org.refcodes.runtime.Options.Builder
- Direct Known Subclasses:
DiagnosticOptions.Builder
- Enclosing class:
Options
Builder for creating
Options instances.
The builder follows the fluent builder pattern and allows incremental construction of option sets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance from the accumulated options.withProperty(Enum aKey, Object aValue) Adds a custom property to the options.withProperty(String aKey, Object aValue) Adds a custom property to the options.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withProperty
Adds a custom property to the options.- Parameters:
aKey- The enumeration representing the key by resolving to its name (as ofEnum.name().aValue- the property value.- Returns:
- this builder instance
-
withProperty
Adds a custom property to the options.- Parameters:
aKey- the property keyaValue- the property value- Returns:
- this builder instance
-
build
Builds a new instance from the accumulated options.- Returns:
- The accordingly constructed options.
-