Class LegalEntityCurveGroup
- java.lang.Object
-
- com.opengamma.strata.market.curve.LegalEntityCurveGroup
-
- All Implemented Interfaces:
CurveGroup,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class LegalEntityCurveGroup extends Object implements CurveGroup, org.joda.beans.ImmutableBean, Serializable
A group of repo curves and issuer curves.This is used to hold a group of related curves, typically forming a logical set. It is often used to hold the results of a curve calibration.
Curve groups can also be created from a set of existing curves.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLegalEntityCurveGroup.BuilderThe bean-builder forLegalEntityCurveGroup.static classLegalEntityCurveGroup.MetaThe meta-bean forLegalEntityCurveGroup.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LegalEntityCurveGroup.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)Optional<Curve>findCurve(CurveName name)Finds the curve with the specified name.Optional<Curve>findIssuerCurve(LegalEntityGroup legalEntityGroup, Currency currency)Finds the issuer curve for the legal entity group and currency if there is one in the group.Optional<Curve>findRepoCurve(RepoGroup repoGroup, Currency currency)Finds the repo curve for the repo group and currency if there is one in the group.ImmutableMap<Pair<LegalEntityGroup,Currency>,Curve>getIssuerCurves()Gets the issuer curves in the curve group, keyed by legal entity group and currency.CurveGroupNamegetName()Gets the name of the curve group.ImmutableMap<Pair<RepoGroup,Currency>,Curve>getRepoCurves()Gets the repo curves in the curve group, keyed by repo group and currency.inthashCode()Stream<Curve>issuerCurveStream()Returns a stream of all issuer curves in the group.static LegalEntityCurveGroup.Metameta()The meta-bean forLegalEntityCurveGroup.LegalEntityCurveGroup.MetametaBean()static LegalEntityCurveGroupof(CurveGroupName name, Map<Pair<RepoGroup,Currency>,Curve> repoCurves, Map<Pair<LegalEntityGroup,Currency>,Curve> issuerCurves)Returns a curve group containing the specified curves.Stream<Curve>repoCurveStream()Returns a stream of all repo curves in the group.Stream<Curve>stream()Returns a stream of all curves in the group.LegalEntityCurveGroup.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
Method Detail
-
of
public static LegalEntityCurveGroup of(CurveGroupName name, Map<Pair<RepoGroup,Currency>,Curve> repoCurves, Map<Pair<LegalEntityGroup,Currency>,Curve> issuerCurves)
Returns a curve group containing the specified curves.- Parameters:
name- the name of the curve grouprepoCurves- the repo curves, keyed by pair of repo group and currencyissuerCurves- the issuer curves, keyed by pair of legal entity group and currency- Returns:
- a curve group containing the specified curves
-
findCurve
public Optional<Curve> findCurve(CurveName name)
Finds the curve with the specified name.If the curve cannot be found, empty is returned.
- Specified by:
findCurvein interfaceCurveGroup- Parameters:
name- the curve name- Returns:
- the curve, empty if not found
-
findRepoCurve
public Optional<Curve> findRepoCurve(RepoGroup repoGroup, Currency currency)
Finds the repo curve for the repo group and currency if there is one in the group.If the curve is not found, optional empty is returned.
- Parameters:
repoGroup- the repo groupcurrency- the currency- Returns:
- the repo curve for the repo group and currency if there is one in the group
-
findIssuerCurve
public Optional<Curve> findIssuerCurve(LegalEntityGroup legalEntityGroup, Currency currency)
Finds the issuer curve for the legal entity group and currency if there is one in the group.If the curve is not found, optional empty is returned.
- Parameters:
legalEntityGroup- the legal entity groupcurrency- the currency- Returns:
- the issuer curve for the legal entity group and currency if there is one in the group
-
stream
public Stream<Curve> stream()
Returns a stream of all curves in the group.- Specified by:
streamin interfaceCurveGroup- Returns:
- Returns a stream of all curves in the group
-
repoCurveStream
public Stream<Curve> repoCurveStream()
Returns a stream of all repo curves in the group.- Returns:
- Returns a stream of all repo curves in the group
-
issuerCurveStream
public Stream<Curve> issuerCurveStream()
Returns a stream of all issuer curves in the group.- Returns:
- Returns a stream of all issuer curves in the group
-
meta
public static LegalEntityCurveGroup.Meta meta()
The meta-bean forLegalEntityCurveGroup.- Returns:
- the meta-bean, not null
-
builder
public static LegalEntityCurveGroup.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public LegalEntityCurveGroup.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getName
public CurveGroupName getName()
Gets the name of the curve group.- Specified by:
getNamein interfaceCurveGroup- Returns:
- the value of the property, not null
-
getRepoCurves
public ImmutableMap<Pair<RepoGroup,Currency>,Curve> getRepoCurves()
Gets the repo curves in the curve group, keyed by repo group and currency.- Returns:
- the value of the property, not null
-
getIssuerCurves
public ImmutableMap<Pair<LegalEntityGroup,Currency>,Curve> getIssuerCurves()
Gets the issuer curves in the curve group, keyed by legal entity group and currency.- Returns:
- the value of the property, not null
-
toBuilder
public LegalEntityCurveGroup.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-