public final class ExplainMap extends Object implements FxConvertible<ExplainMap>, org.joda.beans.ImmutableBean, Serializable
This is a loosely defined data structure that allows an explanation of a calculation to be represented.
| Modifier and Type | Class and Description |
|---|---|
static class |
ExplainMap.Meta
The meta-bean for
ExplainMap. |
| Modifier and Type | Method and Description |
|---|---|
static ExplainMapBuilder |
builder()
Returns a builder for creating the map.
|
ExplainMap |
convertedTo(Currency resultCurrency,
FxRateProvider rateProvider) |
static ExplainMap |
empty()
Creates an instance with no entries.
|
boolean |
equals(Object obj) |
String |
explanationString()
Gets the explanation as a string.
|
<R> Optional<R> |
get(ExplainKey<R> key)
Gets a value by key.
|
ImmutableMap<ExplainKey<?>,Object> |
getMap()
Gets the map of explanatory values.
|
int |
hashCode() |
boolean |
isEmpty()
Returns whether the explanatory map contains no entries.
|
static ExplainMap.Meta |
meta()
The meta-bean for
ExplainMap. |
ExplainMap.Meta |
metaBean() |
static ExplainMap |
of(Map<ExplainKey<?>,Object> map)
Creates an instance from a populated map.
|
String |
toString() |
public static ExplainMap of(Map<ExplainKey<?>,Object> map)
map - the mappublic static ExplainMap empty()
public static ExplainMapBuilder builder()
public <R> Optional<R> get(ExplainKey<R> key)
R - the type of the keykey - the key to lookuppublic String explanationString()
This returns a multi-line string containing the string form of the entries.
public ExplainMap convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
convertedTo in interface FxConvertible<ExplainMap>public boolean isEmpty()
public static ExplainMap.Meta meta()
ExplainMap.public ExplainMap.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic ImmutableMap<ExplainKey<?>,Object> getMap()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.