@Immutable public abstract class AttributeValue extends Object
String, boolean, long or double, represented through
AttributeValue.Type.| Modifier and Type | Class and Description |
|---|---|
static class |
AttributeValue.Type
An enum that represents all the possible value types for an
AttributeValue. |
| 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. |
boolean |
getBooleanValue()
Returns the boolean value of this
AttributeValue. |
double |
getDoubleValue()
Returns the double value of this
AttributeValue. |
long |
getLongValue()
Returns the long value of this
AttributeValue. |
String |
getStringValue()
Returns the string value of this
AttributeValue. |
abstract AttributeValue.Type |
getType()
Returns a
Type corresponding to the underlying value of this AttributeValue. |
static AttributeValue |
longAttributeValue(long longValue)
Returns an
AttributeValue with a long value. |
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.public String getStringValue()
AttributeValue. An UnsupportedOperationException will
be thrown if getType() is not AttributeValue.Type.STRING.AttributeValue.public boolean getBooleanValue()
AttributeValue. An UnsupportedOperationException will
be thrown if getType() is not AttributeValue.Type.BOOLEAN.AttributeValue.public long getLongValue()
AttributeValue. An UnsupportedOperationException will be
thrown if getType() is not AttributeValue.Type.LONG.AttributeValue.public double getDoubleValue()
AttributeValue. An UnsupportedOperationException will
be thrown if getType() is not AttributeValue.Type.DOUBLE.AttributeValue.public abstract AttributeValue.Type getType()
Type corresponding to the underlying value of this AttributeValue.Type for the value of this AttributeValue.