public class Primitive extends DynamoDBEntry
Modifier and Type | Class and Description |
---|---|
static class |
Primitive.DynamoDBPrimitiveType
Enumerator describing type of DynamoDB data in a Primitive or
PrimitiveList.
|
Constructor and Description |
---|
Primitive()
Constructor.
|
Primitive(java.nio.ByteBuffer value)
Constructor.
|
Primitive(java.lang.Integer value,
boolean saveAsNumeric)
Constructor.
|
Primitive(java.lang.Number value)
Constructor.
|
Primitive(java.lang.String value)
Constructor.
|
Primitive(java.lang.String value,
boolean saveAsNumeric)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
asByteBuffer()
Explicitly convert DynamoDBEntry to ByteBuffer.
|
java.lang.Double |
asDouble()
Explicitly convert DynamoDBEntry to Double.
|
java.lang.Float |
asFloat()
Explicitly convert DynamoDBEntry to Float.
|
java.lang.Integer |
asInt()
Explicitly convert DynamoDBEntry to Int.
|
java.lang.Long |
asLong()
Explicitly convert DynamoDBEntry to Long.
|
java.lang.Number |
asNumber()
Explicitly convert DynamoDBEntry to Number.
|
Primitive |
asPrimitive()
Explicitly convert DynamoDBEntry to
Primitive . |
java.lang.String |
asString()
Explicitly convert DynamoDBEntry to String
|
AttributeValue |
convertToAttributeValue()
Converts a
DynamoDBEntry to AttributeValue |
boolean |
equals(java.lang.Object obj) |
Primitive.DynamoDBPrimitiveType |
getType()
Returns the DynamoDBPrimitive Type.
|
java.lang.Object |
getValue()
The primitive value.
|
int |
hashCode() |
asBoolean, asDocument, asDynamoDBList, asPrimitiveList, convertToAttributeUpdateValue, toString
public Primitive()
public Primitive(java.lang.String value)
value
- a primitive string.public Primitive(java.lang.Number value)
value
- a primitive number.public Primitive(java.lang.String value, boolean saveAsNumeric)
value
- a primitive number represented as string.saveAsNumeric
- boolean indicating if the data should be saved as
numeric.public Primitive(java.lang.Integer value, boolean saveAsNumeric)
value
- a primitive integer.saveAsNumeric
- boolean indicating if the data should be saved as
numeric.public Primitive(java.nio.ByteBuffer value)
value
- a byte buffer.public java.lang.String asString()
DynamoDBEntry
asString
in class DynamoDBEntry
public java.nio.ByteBuffer asByteBuffer()
DynamoDBEntry
asByteBuffer
in class DynamoDBEntry
public java.lang.Number asNumber()
DynamoDBEntry
asNumber
in class DynamoDBEntry
public java.lang.Integer asInt()
DynamoDBEntry
asInt
in class DynamoDBEntry
public java.lang.Double asDouble()
DynamoDBEntry
asDouble
in class DynamoDBEntry
public java.lang.Long asLong()
DynamoDBEntry
asLong
in class DynamoDBEntry
public java.lang.Float asFloat()
DynamoDBEntry
asFloat
in class DynamoDBEntry
public AttributeValue convertToAttributeValue()
DynamoDBEntry
DynamoDBEntry
to AttributeValue
convertToAttributeValue
in class DynamoDBEntry
AttributeValue
.public Primitive.DynamoDBPrimitiveType getType()
Primitive.DynamoDBPrimitiveType
.public java.lang.Object getValue()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Primitive asPrimitive()
DynamoDBEntry
Primitive
.asPrimitive
in class DynamoDBEntry
Primitive
.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.