Package com.netflix.genie.web.dtos
Class ResourceSelectionResult.Builder<R>
java.lang.Object
com.netflix.genie.web.dtos.ResourceSelectionResult.Builder<R>
- Type Parameters:
R- The type of the selected resource
- Enclosing class:
- ResourceSelectionResult<R>
A builder for
ResourceSelectionResult instances.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a new immutableResourceSelectionResultinstance out of the current state of this builder.withSelectedResource(R selectedResource) Set the resource that was selected by this selector if any.withSelectionRationale(String selectionRationale) Set the rationale for why a resource as or wasn't selected.
-
Constructor Details
-
Builder
Constructor.- Parameters:
selectorClass- The class that generated this result
-
-
Method Details
-
withSelectedResource
Set the resource that was selected by this selector if any.- Parameters:
selectedResource- The selected resource or null- Returns:
- the builder instance
-
withSelectionRationale
public ResourceSelectionResult.Builder<R> withSelectionRationale(@Nullable String selectionRationale) Set the rationale for why a resource as or wasn't selected.- Parameters:
selectionRationale- The rational or null- Returns:
- the builder instance
-
build
Build a new immutableResourceSelectionResultinstance out of the current state of this builder.- Returns:
- A new
ResourceSelectionResultinstance that is immutable
-