Class DefaultSurfaceMetadata

    • Method Detail

      • of

        public static DefaultSurfaceMetadata of​(String name)
        Creates the metadata.

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

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

        public static DefaultSurfaceMetadata of​(SurfaceName name)
        Creates the metadata.

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

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

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

        public <T> T getInfo​(SurfaceInfoType<T> type)
        Description copied from interface: SurfaceMetadata
        Gets surface information of a specific type.

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

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

        public <T> Optional<T> findInfo​(SurfaceInfoType<T> type)
        Description copied from interface: SurfaceMetadata
        Finds surface information of a specific type.

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

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

        public <T> DefaultSurfaceMetadata withInfo​(SurfaceInfoType<T> type,
                                                   T value)
        Description copied from interface: SurfaceMetadata
        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 SurfaceMetadata
        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 surface metadata
      • withParameterMetadata

        public DefaultSurfaceMetadata withParameterMetadata​(List<? extends ParameterMetadata> parameterMetadata)
        Description copied from interface: SurfaceMetadata
        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 SurfaceMetadata
        Parameters:
        parameterMetadata - the new parameter metadata, may be null
        Returns:
        the new surface metadata
      • toBuilder

        public DefaultSurfaceMetadataBuilder toBuilder()
        Returns a mutable builder initialized with the state of this bean.
        Returns:
        the mutable builder, 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 SurfaceMetadata
        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.

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

        Specified by:
        getYValueType in interface SurfaceMetadata
        Returns:
        the value of the property, not null
      • getZValueType

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

        This type provides meaning to the z-values.

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

        Specified by:
        getZValueType in interface SurfaceMetadata
        Returns:
        the value of the property, not null
      • getInfo

        public ImmutableMap<SurfaceInfoType<?>,​Object> getInfo()
        Gets the additional surface information.

        This stores additional information for the surface.

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

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

        If present, the parameter metadata should match the number of parameters on the surface.

        Specified by:
        getParameterMetadata in interface SurfaceMetadata
        Returns:
        the optional value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object