Class AttributeType<T>

  • Type Parameters:
    T - the type of the attribute value
    All Implemented Interfaces:
    Named,, java.lang.Comparable<AttributeType<T>>

    public final class AttributeType<T>
    extends TypedString<AttributeType<T>>
    The type that provides meaning to an attribute.

    Attributes provide the ability to associate arbitrary information with the trade model in a key-value map. For example, it might be used to provide information about the trading platform.

    Applications that wish to use attributes should declare a static constant declaring the AttributeType instance, the type parameter and a lowerCamelCase name. For example:

      public static final AttributeType<String> DEALER = AttributeType.of("dealer");
    See Also:
    Serialized Form
    • Field Detail


        public static final AttributeType<java.lang.String> DESCRIPTION
        Key used to access the description.
      • NAME

        public static final AttributeType<java.lang.String> NAME
        Key used to access the name.
    • Method Detail

      • of

        public static <T> AttributeType<T> of​(java.lang.String name)
        Obtains an instance from the specified name.

        The name may contain any character, but must not be empty.

        Type Parameters:
        T - the type associated with the info
        name - the name
        a type instance with the specified name