Package com.opengamma.strata.calc
Class ColumnHeader
- java.lang.Object
-
- com.opengamma.strata.calc.ColumnHeader
-
- All Implemented Interfaces:
org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ColumnHeader extends Object implements org.joda.beans.ImmutableBean
Provides access to the column name and measure in the grid of results.CalculationRunner
provides the ability to calculate a grid of results for a given set targets and columns. This defines the columns in the results.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ColumnHeader.Meta
The meta-bean forColumnHeader
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Optional<Currency>
getCurrency()
Gets the currency of the result.Measure
getMeasure()
Gets the measure that was calculated.ColumnName
getName()
Gets the column name.int
hashCode()
static ColumnHeader.Meta
meta()
The meta-bean forColumnHeader
.ColumnHeader.Meta
metaBean()
static ColumnHeader
of(ColumnName name, Measure measure)
Obtains an instance from the name and measure.static ColumnHeader
of(ColumnName name, Measure measure, Currency currency)
Obtains an instance from the name, measure and currency.String
toString()
-
-
-
Method Detail
-
of
public static ColumnHeader of(ColumnName name, Measure measure)
Obtains an instance from the name and measure.- Parameters:
name
- the namemeasure
- the measure- Returns:
- a column with the specified measure
-
of
public static ColumnHeader of(ColumnName name, Measure measure, Currency currency)
Obtains an instance from the name, measure and currency.- Parameters:
name
- the namemeasure
- the measurecurrency
- the currency- Returns:
- a column with the specified measure
-
meta
public static ColumnHeader.Meta meta()
The meta-bean forColumnHeader
.- Returns:
- the meta-bean, not null
-
metaBean
public ColumnHeader.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getName
public ColumnName getName()
Gets the column name.This is the name of the column, and should be unique in a list of columns.
- Returns:
- the value of the property, not null
-
getMeasure
public Measure getMeasure()
Gets the measure that was calculated.This defines the calculation that was performed, such as 'PresentValue' or 'ParRate'.
- Returns:
- the value of the property, not null
-
getCurrency
public Optional<Currency> getCurrency()
Gets the currency of the result.If the measure can be automatically converted to a different currency, and a specific
ReportingCurrency
was specified, then the currency will be stored here. If the reporting currency is "natural", or the result has no currency, then this will be empty.- Returns:
- the optional value of the property, not null
-
-