Class AttributeValue

    • Constructor Detail

      • AttributeValue

        AttributeValue()
    • Method Detail

      • stringAttributeValue

        public static AttributeValue stringAttributeValue​(java.lang.String stringValue)
        Returns an AttributeValue with a string value.
        Parameters:
        stringValue - The new value.
        Returns:
        an AttributeValue with a string value.
        Throws:
        java.lang.NullPointerException - if stringValue is null.
        Since:
        0.5
      • booleanAttributeValue

        public static AttributeValue booleanAttributeValue​(boolean booleanValue)
        Returns an AttributeValue with a boolean value.
        Parameters:
        booleanValue - The new value.
        Returns:
        an AttributeValue with a boolean value.
        Since:
        0.5
      • longAttributeValue

        public static AttributeValue longAttributeValue​(long longValue)
        Returns an AttributeValue with a long value.
        Parameters:
        longValue - The new value.
        Returns:
        an AttributeValue with a long value.
        Since:
        0.5
      • doubleAttributeValue

        public static AttributeValue doubleAttributeValue​(double doubleValue)
        Returns an AttributeValue with a double value.
        Parameters:
        doubleValue - The new value.
        Returns:
        an AttributeValue with a double value.
        Since:
        0.17
      • match

        @Deprecated
        public abstract <T> T match​(Function<? super java.lang.String,​T> stringFunction,
                                    Function<? super java.lang.Boolean,​T> booleanFunction,
                                    Function<? super java.lang.Long,​T> longFunction,
                                    Function<java.lang.Object,​T> defaultFunction)
        Applies a function to the underlying value. The function that is called depends on the value's type, which can be String, Long, or Boolean.
        Parameters:
        stringFunction - the function that should be applied if the value has type String.
        longFunction - the function that should be applied if the value has type Long.
        booleanFunction - the function that should be applied if the value has type Boolean.
        defaultFunction - the function that should be applied if the value has a type that was added after this match method was added to the API. See Functions for some common functions for handling unknown types.
        Returns:
        the result of the function applied to the underlying value.
        Since:
        0.5
      • match

        public abstract <T> T match​(Function<? super java.lang.String,​T> stringFunction,
                                    Function<? super java.lang.Boolean,​T> booleanFunction,
                                    Function<? super java.lang.Long,​T> longFunction,
                                    Function<? super java.lang.Double,​T> doubleFunction,
                                    Function<java.lang.Object,​T> defaultFunction)
        Applies a function to the underlying value. The function that is called depends on the value's type, which can be String, Long, or Boolean.
        Parameters:
        stringFunction - the function that should be applied if the value has type String.
        longFunction - the function that should be applied if the value has type Long.
        booleanFunction - the function that should be applied if the value has type Boolean.
        doubleFunction - the function that should be applied if the value has type Double.
        defaultFunction - the function that should be applied if the value has a type that was added after this match method was added to the API. See Functions for some common functions for handling unknown types.
        Returns:
        the result of the function applied to the underlying value.
        Since:
        0.17