@Immutable public abstract class AttributeValue extends Object
String, Boolean or Long.| Modifier and Type | Method and Description |
|---|---|
static AttributeValue |
booleanAttributeValue(boolean booleanValue)
Returns an
AttributeValue with a boolean value. |
static AttributeValue |
doubleAttributeValue(double doubleValue)
Returns an
AttributeValue with a double value. |
static AttributeValue |
longAttributeValue(long longValue)
Returns an
AttributeValue with a long value. |
abstract <T> T |
match(Function<? super String,T> stringFunction,
Function<? super Boolean,T> booleanFunction,
Function<? super Long,T> longFunction,
Function<? super Double,T> doubleFunction,
Function<Object,T> defaultFunction)
Applies a function to the underlying value.
|
abstract <T> T |
match(Function<? super String,T> stringFunction,
Function<? super Boolean,T> booleanFunction,
Function<? super Long,T> longFunction,
Function<Object,T> defaultFunction)
Deprecated.
|
static AttributeValue |
stringAttributeValue(String stringValue)
Returns an
AttributeValue with a string value. |
public static AttributeValue stringAttributeValue(String stringValue)
AttributeValue with a string value.stringValue - The new value.AttributeValue with a string value.NullPointerException - if stringValue is null.public static AttributeValue booleanAttributeValue(boolean booleanValue)
AttributeValue with a boolean value.booleanValue - The new value.AttributeValue with a boolean value.public static AttributeValue longAttributeValue(long longValue)
AttributeValue with a long value.longValue - The new value.AttributeValue with a long value.public static AttributeValue doubleAttributeValue(double doubleValue)
AttributeValue with a double value.doubleValue - The new value.AttributeValue with a double value.@Deprecated public abstract <T> T match(Function<? super String,T> stringFunction, Function<? super Boolean,T> booleanFunction, Function<? super Long,T> longFunction, Function<Object,T> defaultFunction)
match(Function, Function, Function, Function, Function).String, Long, or Boolean.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.public abstract <T> T match(Function<? super String,T> stringFunction, Function<? super Boolean,T> booleanFunction, Function<? super Long,T> longFunction, Function<? super Double,T> doubleFunction, Function<Object,T> defaultFunction)
String, Long, or Boolean.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.