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
Pairto create an object that handles partial success/failure, such asPair<List<String>, FailureItems>. However, from v1.1.1ValueWithFailurescaptures that use case better.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFailureItems.MetaThe meta-bean forFailureItems.
-
Field Summary
Fields Modifier and Type Field Description static FailureItemsEMPTYAn empty failure list.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FailureItemsBuilderbuilder()Creates a builder to create the list of failures.FailureItemscombinedWith(FailureItem... otherFailures)Combines these failure items with other failure items.FailureItemscombinedWith(FailureItems other)Combines these failure items with other failure items.FailureItemscombinedWith(List<FailureItem> otherFailures)Combines these failure items with other failure items.booleanequals(Object obj)ImmutableList<FailureItem>getFailures()Gets the failures.inthashCode()booleanisEmpty()Checks if the list of failures is empty.static FailureItems.Metameta()The meta-bean forFailureItems.FailureItems.MetametaBean()static FailureItemsof(FailureItem... failures)Creates an instance from the list of failures.static FailureItemsof(List<FailureItem> failures)Creates an instance from the list of failures.StringtoString()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:
metaBeanin interfaceorg.joda.beans.Bean
-
getFailures
public ImmutableList<FailureItem> getFailures()
Gets the failures.- Returns:
- the value of the property, not null
-
-