T - public class Result<T>
extends java.lang.Object
| Modifier and Type | Method | 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,
java.lang.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(java.lang.Iterable<? extends ModelProblem> problems) |
Error with problems describing the cause
|
static <T> Result<T> |
error(Result<?> result) |
|
static <T> Result<T> |
error(Result<?>... results) |
|
static <T> Result<T> |
error(T model) |
|
static <T> Result<T> |
error(T model,
java.lang.Iterable<? extends ModelProblem> problems) |
Error with partial result and problems describing the cause
|
T |
get() |
|
java.lang.Iterable<? extends ModelProblem> |
getProblems() |
|
boolean |
hasErrors() |
|
static <T> Result<T> |
newResult(T model,
java.lang.Iterable<? extends ModelProblem> problems) |
New result - determine whether error or success by checking problems for errors
|
static <T> Result<java.lang.Iterable<T>> |
newResultSet(java.lang.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,
java.lang.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, java.lang.Iterable<? extends ModelProblem> problems)
model - problems - public static <T> Result<T> success(T model, Result<?>... results)
model - results - public static <T> Result<T> error(java.lang.Iterable<? extends ModelProblem> problems)
problems - public static <T> Result<T> error(T model)
public static <T> Result<T> error(T model, java.lang.Iterable<? extends ModelProblem> problems)
model - problems - public static <T> Result<T> newResult(T model, java.lang.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, java.lang.Iterable<? extends ModelProblem> problems)
result - problems - public static <T> Result<java.lang.Iterable<T>> newResultSet(java.lang.Iterable<? extends Result<? extends T>> results)
results - public java.lang.Iterable<? extends ModelProblem> getProblems()
public T get()
public boolean hasErrors()