Class MultiSided

java.lang.Object
org.drip.param.definition.Quote
org.drip.param.quote.MultiSided

public class MultiSided
extends Quote
MultiSided implements the Quote interface, which contains the stubs corresponding to a product quote. It contains the quote value, quote instant for the different quote sides (bid/ask/mid).

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    MultiSided​(java.lang.String strSide, double dblQuote)
    MultiSidedQuote Constructor: Constructs a Quote object from the quote value and the side string.
    MultiSided​(java.lang.String strSide, double dblQuote, double dblSize)
    MultiSided Constructor: Constructs a Quote object from the quote size/value and the side string.
  • Method Summary

    Modifier and Type Method Description
    boolean setSide​(java.lang.String strSide, double dblQuote, double dblSize)
    Set the quote for the specified side
    double size​(java.lang.String strSide)
    Get the quote size for the given side
    DateTime time​(java.lang.String strSide)
    Get the time of the quote
    double value​(java.lang.String strSide)
    Get the quote value for the given side

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MultiSided

      public MultiSided​(java.lang.String strSide, double dblQuote) throws java.lang.Exception
      MultiSidedQuote Constructor: Constructs a Quote object from the quote value and the side string.
      Parameters:
      strSide - bid/ask/mid
      dblQuote - Quote Value
      Throws:
      java.lang.Exception - Thrown on invalid inputs
    • MultiSided

      public MultiSided​(java.lang.String strSide, double dblQuote, double dblSize) throws java.lang.Exception
      MultiSided Constructor: Constructs a Quote object from the quote size/value and the side string.
      Parameters:
      strSide - bid/ask/mid
      dblQuote - Quote Value
      dblSize - Size
      Throws:
      java.lang.Exception - Thrown on invalid inputs
  • Method Details

    • value

      public double value​(java.lang.String strSide)
      Description copied from class: Quote
      Get the quote value for the given side
      Specified by:
      value in class Quote
      Parameters:
      strSide - bid/ask/mid
      Returns:
      Quote Value
    • size

      public double size​(java.lang.String strSide)
      Description copied from class: Quote
      Get the quote size for the given side
      Specified by:
      size in class Quote
      Parameters:
      strSide - bid/ask/mid
      Returns:
      Size
    • time

      public DateTime time​(java.lang.String strSide)
      Description copied from class: Quote
      Get the time of the quote
      Specified by:
      time in class Quote
      Parameters:
      strSide - bid/ask/mid
      Returns:
      DateTime
    • setSide

      public boolean setSide​(java.lang.String strSide, double dblQuote, double dblSize)
      Description copied from class: Quote
      Set the quote for the specified side
      Specified by:
      setSide in class Quote
      Parameters:
      strSide - bid/ask/mid
      dblQuote - Quote value
      dblSize - Size
      Returns:
      Success (true) or failure (false)