Class TenorTenorParameterMetadata

    • Method Detail

      • of

        public static TenorTenorParameterMetadata of​(Tenor expiryTenor,
                                                     Tenor underlyingTenor)
        Creates node metadata with expiry tenor and underlying tenor.
        Parameters:
        expiryTenor - the expiry tenor
        underlyingTenor - the underlying
        Returns:
        the metadata
      • of

        public static TenorTenorParameterMetadata of​(Tenor expiryTenor,
                                                     Tenor underlyingTenor,
                                                     String label)
        Creates node metadata with expiry tenor, underlying tenor and label.
        Parameters:
        expiryTenor - the expiry tenor
        underlyingTenor - the underlying
        label - the label
        Returns:
        the metadata
      • getIdentifier

        public Pair<Tenor,​Tenor> getIdentifier()
        Description copied from interface: ParameterMetadata
        Returns an object used to identify the parameter.

        A good choice of identifier is one that makes sense to the user and can easily be created as part of a scenario definition. For example, many nodes types are naturally identified by a tenor.

        The identifier must satisfy the following criteria:

        • It must be non-null
        • It should be unique within a single data set
        • It should have a sensible implementation of hashCode() and equals().
        Otherwise the choice of identifier is free and the system makes no assumptions about it.
        Specified by:
        getIdentifier in interface ParameterMetadata
        Returns:
        an object used to uniquely identify the parameter within the data
      • getExpiryTenor

        public Tenor getExpiryTenor()
        Gets the expiry tenor associated with the parameter.
        Returns:
        the value of the property, not null
      • getUnderlyingTenor

        public Tenor getUnderlyingTenor()
        Gets the underlying tenor associated with the parameter.
        Returns:
        the value of the property, not null
      • getLabel

        public String getLabel()
        Gets the label that describes the parameter, defaulted to both tenors.
        Specified by:
        getLabel in interface ParameterMetadata
        Returns:
        the value of the property, not empty
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object