T
- public class Result<T> extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Result<T> |
addProblem(Result<T> result,
ModelProblem problem)
New result consisting of given result and new problem.
|
static <T> Result<T> |
addProblems(Result<T> result,
Iterable<? extends ModelProblem> problems)
New result that includes the given
|
static <T> Result<T> |
addProblems(Result<T> result,
Result<?>... results) |
static <T> Result<T> |
error(Iterable<? extends ModelProblem> problems)
Error with problems describing the cause
|
static <T> Result<T> |
error(Result<?>... results) |
static <T> Result<T> |
error(Result<?> result) |
static <T> Result<T> |
error(T model) |
static <T> Result<T> |
error(T model,
Iterable<? extends ModelProblem> problems)
Error with partial result and problems describing the cause
|
T |
get() |
Iterable<? extends ModelProblem> |
getProblems() |
boolean |
hasErrors() |
static <T> Result<T> |
newResult(T model,
Iterable<? extends ModelProblem> problems)
New result - determine whether error or success by checking problems for errors
|
static <T> Result<Iterable<T>> |
newResultSet(Iterable<? extends Result<? extends T>> results)
Turns the given results into a single result by combining problems and models into single collection.
|
static <T> Result<T> |
success(T model)
Success without warnings
|
static <T> Result<T> |
success(T model,
Iterable<? extends ModelProblem> problems)
Success with warnings
|
static <T> Result<T> |
success(T model,
Result<?>... results)
Success with warnings
|
public static <T> Result<T> success(T model)
model
- public static <T> Result<T> success(T model, Iterable<? extends ModelProblem> problems)
model
- problems
- public static <T> Result<T> success(T model, Result<?>... results)
model
- results
- public static <T> Result<T> error(Iterable<? extends ModelProblem> problems)
problems
- public static <T> Result<T> error(T model)
public static <T> Result<T> error(T model, Iterable<? extends ModelProblem> problems)
model
- problems
- public static <T> Result<T> newResult(T model, Iterable<? extends ModelProblem> problems)
model
- problems
- public static <T> Result<T> addProblem(Result<T> result, ModelProblem problem)
result
- problem
- public static <T> Result<T> addProblems(Result<T> result, Iterable<? extends ModelProblem> problems)
result
- problems
- public static <T> Result<Iterable<T>> newResultSet(Iterable<? extends Result<? extends T>> results)
results
- public Iterable<? extends ModelProblem> getProblems()
public T get()
public boolean hasErrors()
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.