Class SecurityInfoBuilder


  • public final class SecurityInfoBuilder
    extends 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> attributeType,
                                                    T attributeValue)
        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:
        attributeType - the type providing meaning to the value
        attributeValue - the value
        Returns:
        this, for chaining
      • build

        public SecurityInfo build()
        Builds the security information.
        Returns:
        the security information