Class DefaultCurveMetadata

    • Method Detail

      • of

        public static DefaultCurveMetadata of​(java.lang.String name)
        Creates the metadata.

        No information will be available for the x-values, y-values or parameters.

        Parameters:
        name - the curve name
        Returns:
        the metadata
      • of

        public static DefaultCurveMetadata of​(CurveName name)
        Creates the metadata.

        No information will be available for the x-values, y-values or parameters.

        Parameters:
        name - the curve name
        Returns:
        the metadata
      • builder

        public static DefaultCurveMetadataBuilder builder()
        Returns a builder used to create an instance of the bean.
        Returns:
        the builder, not null
      • getInfo

        public <T> T getInfo​(CurveInfoType<T> type)
        Description copied from interface: CurveMetadata
        Gets curve information of a specific type.

        If the information is not found, an exception is thrown.

        The most common information is the day count and curve calibration information.

        Specified by:
        getInfo in interface CurveMetadata
        Type Parameters:
        T - the type of the info
        Parameters:
        type - the type to find
        Returns:
        the curve information
      • findInfo

        public <T> java.util.Optional<T> findInfo​(CurveInfoType<T> type)
        Description copied from interface: CurveMetadata
        Finds curve information of a specific type.

        If the info is not found, optional empty is returned.

        The most common information is the day count and curve calibration information.

        Specified by:
        findInfo in interface CurveMetadata
        Type Parameters:
        T - the type of the info
        Parameters:
        type - the type to find
        Returns:
        the curve information
      • withInfo

        public <T> DefaultCurveMetadata withInfo​(CurveInfoType<T> type,
                                                 T value)
        Description copied from interface: CurveMetadata
        Returns an instance where the specified additional information has been added.

        The additional information is stored in the result using Map.put semantics, removing the key if the instance is null.

        Specified by:
        withInfo in interface CurveMetadata
        Type Parameters:
        T - the type of the info
        Parameters:
        type - the type to store under
        value - the value to store, may be null
        Returns:
        the new curve metadata
      • withParameterMetadata

        public DefaultCurveMetadata withParameterMetadata​(java.util.List<? extends ParameterMetadata> parameterMetadata)
        Description copied from interface: CurveMetadata
        Returns an instance where the parameter metadata has been changed.

        The result will contain the specified parameter metadata. A null value is accepted and causes the result to have no parameter metadata.

        Specified by:
        withParameterMetadata in interface CurveMetadata
        Parameters:
        parameterMetadata - the new parameter metadata, may be null
        Returns:
        the new curve metadata
      • toBuilder

        public DefaultCurveMetadataBuilder toBuilder()
        Returns a mutable builder initialized with the state of this bean.
        Returns:
        the mutable builder, not null
      • meta

        public static DefaultCurveMetadata.Meta meta()
        The meta-bean for DefaultCurveMetadata.
        Returns:
        the meta-bean, not null
      • getCurveName

        public CurveName getCurveName()
        Gets the curve name.
        Specified by:
        getCurveName in interface CurveMetadata
        Returns:
        the value of the property, not null
      • getXValueType

        public ValueType getXValueType()
        Gets the x-value type, providing meaning to the x-values of the curve.

        This type provides meaning to the x-values. For example, the x-value might represent a year fraction, as represented using ValueType.YEAR_FRACTION.

        If using the builder, this defaults to ValueType.UNKNOWN.

        Specified by:
        getXValueType in interface CurveMetadata
        Returns:
        the value of the property, not null
      • getYValueType

        public ValueType getYValueType()
        Gets the y-value type, providing meaning to the y-values of the curve.

        This type provides meaning to the y-values. For example, the y-value might represent a zero rate, as represented using ValueType.ZERO_RATE.

        If using the builder, this defaults to ValueType.UNKNOWN.

        Specified by:
        getYValueType in interface CurveMetadata
        Returns:
        the value of the property, not null
      • getInfo

        public com.google.common.collect.ImmutableMap<CurveInfoType<?>,​java.lang.Object> getInfo()
        Gets the additional curve information.

        This stores additional information for the curve.

        The most common information is the day count and curve calibration Jacobian.

        Returns:
        the value of the property, not null
      • getParameterMetadata

        public java.util.Optional<java.util.List<ParameterMetadata>> getParameterMetadata()
        Gets the metadata about the parameters.

        If present, the parameter metadata will match the number of parameters on the curve.

        Specified by:
        getParameterMetadata in interface CurveMetadata
        Returns:
        the optional value of the property, 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