Class FailureItems
- java.lang.Object
-
- com.opengamma.strata.collect.result.FailureItems
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class FailureItems extends Object implements org.joda.beans.ImmutableBean, Serializable
A list of failure items.This provides a wrapper around a list of
FailureItem
.This could be used with
Pair
to create an object that handles partial success/failure, such asPair<List<String>, FailureItems>
. However, from v1.1.1ValueWithFailures
captures that use case better.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FailureItems.Meta
The meta-bean forFailureItems
.
-
Field Summary
Fields Modifier and Type Field Description static FailureItems
EMPTY
An empty failure list.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FailureItemsBuilder
builder()
Creates a builder to create the list of failures.FailureItems
combinedWith(FailureItem... otherFailures)
Combines these failure items with other failure items.FailureItems
combinedWith(FailureItems other)
Combines these failure items with other failure items.FailureItems
combinedWith(List<FailureItem> otherFailures)
Combines these failure items with other failure items.boolean
equals(Object obj)
ImmutableList<FailureItem>
getFailures()
Gets the failures.int
hashCode()
boolean
isEmpty()
Checks if the list of failures is empty.static FailureItems.Meta
meta()
The meta-bean forFailureItems
.FailureItems.Meta
metaBean()
static FailureItems
of(FailureItem... failures)
Creates an instance from the list of failures.static FailureItems
of(List<FailureItem> failures)
Creates an instance from the list of failures.String
toString()
Returns a string summary of the failures, as a single line excluding the stack traces.
-
-
-
Field Detail
-
EMPTY
public static final FailureItems EMPTY
An empty failure list.
-
-
Method Detail
-
of
public static FailureItems of(FailureItem... failures)
Creates an instance from the list of failures.- Parameters:
failures
- the failures- Returns:
- the failure items
-
of
public static FailureItems of(List<FailureItem> failures)
Creates an instance from the list of failures.- Parameters:
failures
- the failures- Returns:
- the failure items
-
builder
public static FailureItemsBuilder builder()
Creates a builder to create the list of failures.- Returns:
- a builder
-
combinedWith
public FailureItems combinedWith(FailureItems other)
Combines these failure items with other failure items.- Parameters:
other
- the other failure items- Returns:
- the combined failure items
-
combinedWith
public FailureItems combinedWith(FailureItem... otherFailures)
Combines these failure items with other failure items.- Parameters:
otherFailures
- the other failure items- Returns:
- the combined failure items
-
combinedWith
public FailureItems combinedWith(List<FailureItem> otherFailures)
Combines these failure items with other failure items.- Parameters:
otherFailures
- the other failure items- Returns:
- the combined failure items
-
isEmpty
public boolean isEmpty()
Checks if the list of failures is empty.- Returns:
- true if there are no failures
-
toString
public String toString()
Returns a string summary of the failures, as a single line excluding the stack traces.
-
meta
public static FailureItems.Meta meta()
The meta-bean forFailureItems
.- Returns:
- the meta-bean, not null
-
metaBean
public FailureItems.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getFailures
public ImmutableList<FailureItem> getFailures()
Gets the failures.- Returns:
- the value of the property, not null
-
-