Trade (Java Functional Samples)
Date: 2020-08-07

vwap

## Class Trade

- java.lang.Object
- - vwap.Ticker
  - - vwap.Trade

- All Implemented Interfaces:
    java.io.Serializable

      public class Trade
      extends Ticker

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Trade(java.lang.String ticker, java.math.BigDecimal price, java.math.BigDecimal volume)`
    `Trade(com.ibm.streams.operator.Tuple tuple)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Trade` | `convertToTrade(com.ibm.streams.operator.Tuple tuple)` Convert a trade SPL tuple to a Trade object.
    `static com.ibm.streamsx.topology.TStream<Trade>` | `getTrades(com.ibm.streamsx.topology.spl.SPLStream tradeQuotes)` Get the stream of trades from the SPL stream.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class vwap.Ticker

      `getTicker`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Trade

          public Trade(java.lang.String ticker,
                       java.math.BigDecimal price,
                       java.math.BigDecimal volume)

    - #### Trade

          public Trade(com.ibm.streams.operator.Tuple tuple)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### convertToTrade

          public static Trade convertToTrade(com.ibm.streams.operator.Tuple tuple)

      Convert a trade SPL tuple to a Trade object.

    - #### getTrades

          public static com.ibm.streamsx.topology.TStream<Trade> getTrades(com.ibm.streamsx.topology.spl.SPLStream tradeQuotes)

      Get the stream of trades from the SPL stream. The stream is keyed by the ticker symbol.