Class Quote

  • All Implemented Interfaces:
    Bean, ImmutableBean

    public final class Quote
    extends java.lang.Object
    implements ImmutableBean
    A quoted value for a given security, such as an equity or future.

    This represents a single numeric value of a given security, such as the mid point between the buy/sell. The QuoteId specifies the security, the type of price and the price source.

    This class is immutable and thread-safe.

    • Method Detail

      • of

        public static Quote of​(QuoteId quoteId,
                               double value)
        Obtains an instance from the quote identifier and value.
        Parameters:
        quoteId - the quote identifier
        value - the value for the given quote
        Returns:
        the quote instance for the given values
      • meta

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

        public QuoteId getQuoteId()
        Gets the identifier of the quoted value.
        Returns:
        the value of the property, not null
      • getValue

        public double getValue()
        Gets the value that was quoted.
        Returns:
        the 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