Class LegalEntityCurveGroup

  • All Implemented Interfaces:
    CurveGroup, java.io.Serializable, Bean, ImmutableBean

    public final class LegalEntityCurveGroup
    extends java.lang.Object
    implements CurveGroup, ImmutableBean, java.io.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
    • Method Detail

      • of

        public static LegalEntityCurveGroup of​(CurveGroupName name,
                                               java.util.Map<Pair<RepoGroup,​Currency>,​Curve> repoCurves,
                                               java.util.Map<Pair<LegalEntityGroup,​Currency>,​Curve> issuerCurves)
        Returns a curve group containing the specified curves.
        Parameters:
        name - the name of the curve group
        repoCurves - the repo curves, keyed by pair of repo group and currency
        issuerCurves - the issuer curves, keyed by pair of legal entity group and currency
        Returns:
        a curve group containing the specified curves
      • findCurve

        public java.util.Optional<Curve> findCurve​(CurveName name)
        Finds the curve with the specified name.

        If the curve cannot be found, empty is returned.

        Specified by:
        findCurve in interface CurveGroup
        Parameters:
        name - the curve name
        Returns:
        the curve, empty if not found
      • findRepoCurve

        public java.util.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 group
        currency - the currency
        Returns:
        the repo curve for the repo group and currency if there is one in the group
      • findIssuerCurve

        public java.util.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 group
        currency - the currency
        Returns:
        the issuer curve for the legal entity group and currency if there is one in the group
      • stream

        public java.util.stream.Stream<Curve> stream()
        Returns a stream of all curves in the group.
        Specified by:
        stream in interface CurveGroup
        Returns:
        Returns a stream of all curves in the group
      • repoCurveStream

        public java.util.stream.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 java.util.stream.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 for LegalEntityCurveGroup.
        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
      • getName

        public CurveGroupName getName()
        Gets the name of the curve group.
        Specified by:
        getName in interface CurveGroup
        Returns:
        the value of the property, not null
      • getRepoCurves

        public com.google.common.collect.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 com.google.common.collect.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
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object