| Package | Description |
|---|---|
| com.opengamma.strata.collect.result |
Result data structures.
|
| Modifier and Type | Method and Description |
|---|---|
Failure |
FailureException.getFailure()
Returns the details of the failure.
|
Failure |
Result.getFailure()
Returns the failure instance indicating the reason why the calculation failed.
|
static Failure |
Failure.of(Collection<FailureItem> items)
Obtains a failure for a non-empty collection of failure items.
|
static Failure |
Failure.of(FailureItem item)
Obtains a failure for a single failure item.
|
static Failure |
Failure.of(FailureItem item,
FailureItem... additionalItems)
Obtains a failure for multiple failure items.
|
static Failure |
Failure.of(FailureReason reason,
Exception cause)
Obtains a failure from a reason and exception.
|
static Failure |
Failure.of(FailureReason reason,
Exception cause,
String message,
Object... messageArgs)
Obtains a failure from a reason, message and exception.
|
static Failure |
Failure.of(FailureReason reason,
String message,
Object... messageArgs)
Obtains a failure from a reason and message.
|
static Failure |
Failure.of(FailureReason reason,
Throwable cause)
Obtains a failure from a reason and throwable.
|
static Failure |
Failure.of(FailureReason reason,
Throwable cause,
String message,
Object... messageArgs)
Obtains a failure from a reason, message and throwable.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends Failure> |
Failure.Meta.beanType() |
org.joda.beans.BeanBuilder<? extends Failure> |
Failure.Meta.builder() |
org.joda.beans.MetaProperty<Failure> |
Result.Meta.failure()
The meta-property for the
failure property. |
| Modifier and Type | Method and Description |
|---|---|
static <R> Result<R> |
Result.failure(Failure failure)
Creates a failed result containing a failure.
|
| Modifier and Type | Method and Description |
|---|---|
T |
Result.getValueOrElseApply(Function<Failure,T> mapper)
Returns the actual result value if calculated successfully, else the
specified function is applied to the
Failure that occurred. |
void |
Result.ifFailure(Consumer<Failure> consumer)
Executes the given consumer if the result represents a failure.
|
| Constructor and Description |
|---|
FailureException(Failure failure)
Returns an exception wrapping a failure that couldn't be handled.
|
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.