Interface AttributeKey<T>

  • Type Parameters:
    T - The type of value that can be set with the key.

    @Immutable
    public interface AttributeKey<T>
    This interface provides a handle for setting the values of Attributes. The type of value that can be set with an implementation of this key is denoted by the type parameter.

    Implementations MUST be immutable, as these are used as the keys to Maps.

    • Method Detail

      • getKey

        String getKey()
        Returns the underlying String representation of the key.
      • getType

        AttributeType getType()
        Returns the type of attribute for this key. Useful for building switch statements.
      • stringKey

        static AttributeKey<String> stringKey​(String key)
        Returns a new AttributeKey for String valued attributes.
      • booleanKey

        static AttributeKey<Boolean> booleanKey​(String key)
        Returns a new AttributeKey for Boolean valued attributes.
      • longKey

        static AttributeKey<Long> longKey​(String key)
        Returns a new AttributeKey for Long valued attributes.
      • doubleKey

        static AttributeKey<Double> doubleKey​(String key)
        Returns a new AttributeKey for Double valued attributes.
      • stringArrayKey

        static AttributeKey<List<String>> stringArrayKey​(String key)
        Returns a new AttributeKey for List<String> valued attributes.
      • booleanArrayKey

        static AttributeKey<List<Boolean>> booleanArrayKey​(String key)
        Returns a new AttributeKey for List<Boolean> valued attributes.
      • longArrayKey

        static AttributeKey<List<Long>> longArrayKey​(String key)
        Returns a new AttributeKey for List<Long> valued attributes.
      • doubleArrayKey

        static AttributeKey<List<Double>> doubleArrayKey​(String key)
        Returns a new AttributeKey for List<Double> valued attributes.