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>
public static class ResourceSelectionResult.Builder<R> extends java.lang.ObjectA builder forResourceSelectionResultinstances.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.Class<?> selectorClass)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceSelectionResult<R>build()Build a new immutableResourceSelectionResultinstance out of the current state of this builder.ResourceSelectionResult.Builder<R>withSelectedResource(R selectedResource)Set the resource that was selected by this selector if any.ResourceSelectionResult.Builder<R>withSelectionRationale(java.lang.String selectionRationale)Set the rationale for why a resource as or wasn't selected.
-
-
-
Method Detail
-
withSelectedResource
public ResourceSelectionResult.Builder<R> withSelectedResource(@Nullable R selectedResource)
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 java.lang.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
public ResourceSelectionResult<R> build()
Build a new immutableResourceSelectionResultinstance out of the current state of this builder.- Returns:
- A new
ResourceSelectionResultinstance that is immutable
-
-