Package io.micronaut.core.bind
Interface ArgumentBinder.BindingResult<T>
- Type Parameters:
T
-
- All Known Subinterfaces:
PendingRequestBindingResult<T>
- Enclosing interface:
- ArgumentBinder<T,
S>
public static interface ArgumentBinder.BindingResult<T>
The result of binding.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ArgumentBinder.BindingResult
An empty but satisfied result.static final ArgumentBinder.BindingResult
An empty but unsatisfied result. -
Method Summary
Modifier and TypeMethodDescriptionstatic <R> ArgumentBinder.BindingResult<R>
empty()
default <R> @NonNull ArgumentBinder.BindingResult<R>
flatMap
(@NonNull Function<T, ArgumentBinder.BindingResult<R>> transform) Transform the result, if present.default T
get()
Obtains the value.default List<ConversionError>
getValue()
default boolean
default boolean
static <R> ArgumentBinder.BindingResult<R>
-
Field Details
-
EMPTY
An empty but satisfied result. -
UNSATISFIED
An empty but unsatisfied result.
-
-
Method Details
-
getValue
- Returns:
- The bound value
-
getConversionErrors
- Returns:
- The
ConversionError
instances that occurred
-
isSatisfied
default boolean isSatisfied()- Returns:
- Was the binding requirement satisfied
-
isPresentAndSatisfied
default boolean isPresentAndSatisfied()- Returns:
- Is the value present and satisfied
-
get
Obtains the value. Callers should callisPresentAndSatisfied()
first.- Returns:
- The value
-
flatMap
@NonNull default <R> @NonNull ArgumentBinder.BindingResult<R> flatMap(@NonNull @NonNull Function<T, ArgumentBinder.BindingResult<R>> transform) Transform the result, if present.- Type Parameters:
R
- The type of the mapped result- Parameters:
transform
- The transformation function- Returns:
- The mapped result
- Since:
- 4.0.0
-
empty
- Type Parameters:
R
- The result type- Returns:
- An empty but satisfied result.
- Since:
- 4.0.0
-
unsatisfied
- Type Parameters:
R
- The result type- Returns:
- An empty but unsatisfied result.
- Since:
- 4.0.0
-