Class SecurityInfoBuilder


  • public final class SecurityInfoBuilder
    extends java.lang.Object
    Builder to create SecurityInfo.

    This builder allows a SecurityInfo to be created.

    • Method Detail

      • id

        public SecurityInfoBuilder id​(SecurityId id)
        Sets the security identifier.

        This identifier uniquely identifies the security within the system.

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

        public SecurityInfoBuilder priceInfo​(SecurityPriceInfo priceInfo)
        Sets the information about the security price.

        This provides information about the security price. This can be used to convert the price into a monetary value.

        Parameters:
        priceInfo - the price info
        Returns:
        this, for chaining
      • addAttribute

        public <T> SecurityInfoBuilder addAttribute​(AttributeType<T> type,
                                                    T value)
        Adds a security 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 SecurityInfo build()
        Builds the security information.
        Returns:
        the security information