Class TradeInfoBuilder


  • public final class TradeInfoBuilder
    extends java.lang.Object
    Builder to create TradeInfo.

    This builder allows a TradeInfo to be created.

    • Method Detail

      • id

        public TradeInfoBuilder id​(StandardId id)
        Sets the primary identifier for the trade, optional.

        The identifier is used to identify the trade.

        Parameters:
        id - the identifier
        Returns:
        this, for chaining
      • counterparty

        public TradeInfoBuilder counterparty​(StandardId counterparty)
        Sets the counterparty identifier, optional.

        An identifier used to specify the counterparty of the trade.

        Parameters:
        counterparty - the counterparty
        Returns:
        this, for chaining
      • tradeDate

        public TradeInfoBuilder tradeDate​(java.time.LocalDate tradeDate)
        Sets the trade date, optional.
        Parameters:
        tradeDate - the trade date
        Returns:
        this, for chaining
      • tradeTime

        public TradeInfoBuilder tradeTime​(java.time.LocalTime tradeTime)
        Sets the trade time, optional.
        Parameters:
        tradeTime - the trade time
        Returns:
        this, for chaining
      • zone

        public TradeInfoBuilder zone​(java.time.ZoneId zone)
        Sets the trade time-zone, optional.
        Parameters:
        zone - the trade zone
        Returns:
        this, for chaining
      • settlementDate

        public TradeInfoBuilder settlementDate​(java.time.LocalDate settlementDate)
        Sets the settlement date, optional.
        Parameters:
        settlementDate - the settlement date
        Returns:
        this, for chaining
      • addAttribute

        public <T> TradeInfoBuilder addAttribute​(AttributeType<T> type,
                                                 T value)
        Adds a trade attribute to the map of attributes.

        The attribute is added using Map.put(type, value) semantics.

        Type Parameters:
        T - the type of the value
        Parameters:
        type - the type providing meaning to the value
        value - the value
        Returns:
        this, for chaining
      • build

        public TradeInfo build()
        Builds the trade information.
        Returns:
        the trade information