public enum InternalUtils extends java.lang.Enum<InternalUtils>
Modifier and Type | Method and Description |
---|---|
static <X extends AmazonWebServiceRequest> |
applyUserAgent(X request)
Append the custom user-agent string.
|
static void |
checkInvalidAttribute(java.lang.String attrName,
java.lang.Object val) |
static void |
checkInvalidAttrName(java.lang.String attrName) |
static java.util.Map<java.lang.String,AttributeValue> |
fromSimpleMap(java.util.Map<java.lang.String,java.lang.Object> map)
Converts a map of string to simple objects into the low-level
representation; or null if the input is null.
|
static java.lang.Integer |
minimum(java.lang.Integer one,
java.lang.Integer two)
Returns the minimum of the two input integers taking null into account.
|
static void |
rejectEmptyInput(java.lang.Object[] input) |
static void |
rejectNullInput(java.lang.Object input) |
static void |
rejectNullOrEmptyInput(java.lang.Object[] input) |
static void |
rejectNullValue(java.lang.Object val) |
static java.util.Map<java.lang.String,Condition> |
toAttributeConditionMap(java.util.Collection<? extends Filter<?>> filters)
Returns the low level representation of a collection of
Filter . |
static AttributeValue |
toAttributeValue(java.lang.Object value)
Converts a simple value into the low-level
|
static java.util.Map<java.lang.String,AttributeValue> |
toAttributeValueMap(java.util.Collection<KeyAttribute> primaryKey)
Converts the specified primary key into the low-level representation.
|
static java.util.Map<java.lang.String,AttributeValue> |
toAttributeValueMap(KeyAttribute... primaryKey)
Converts the specified primary key into the low-level representation.
|
static java.util.Map<java.lang.String,AttributeValue> |
toAttributeValueMap(PrimaryKey primaryKey)
Converts the specified primary key into the low-level representation.
|
static java.util.Map<java.lang.String,AttributeValue> |
toAttributeValues(Item item)
Converts an
Item into the low-level representation;
or null if the input is null. |
static AttributeValue[] |
toAttributeValues(java.lang.Object[] values)
Converts the input array of values into an array of low level
representation of those values.
|
static java.util.Map<java.lang.String,AttributeValueUpdate> |
toAttributeValueUpdate(java.util.List<AttributeUpdate> attributesToUpdate)
Converts a list of
AttributeUpdate into the low-level
representation; or null if the input is null. |
static java.math.BigDecimal |
toBigDecimal(java.lang.Number n)
Converts a number into BigDecimal representation.
|
static java.util.Set<java.math.BigDecimal> |
toBigDecimalSet(java.lang.Number... val) |
static java.util.Set<java.math.BigDecimal> |
toBigDecimalSet(java.util.Set<java.lang.Number> vals) |
static java.util.Map<java.lang.String,ExpectedAttributeValue> |
toExpectedAttributeValueMap(java.util.Collection<Expected> expectedSet)
Returns the low level representation of a collection of
Expected . |
static java.util.List<Item> |
toItemList(java.util.List<java.util.Map<java.lang.String,AttributeValue>> items)
Returns a non-null list of
Item 's given the low level
list of item information. |
static java.util.List<java.lang.Object> |
toSimpleList(java.util.List<AttributeValue> attrValues)
Converts a list of low-level
AttributeValue into a list of
simple values. |
static <T> java.util.List<T> |
toSimpleListValue(java.util.List<AttributeValue> values)
Convenient method to convert a list of low-level
AttributeValue into a list of values of the same type T. |
static <T> java.util.Map<java.lang.String,T> |
toSimpleMapValue(java.util.Map<java.lang.String,AttributeValue> values) |
(package private) static <T> T |
toSimpleValue(AttributeValue value)
Converts a low-level
AttributeValue into a simple value,
which can be one of the followings:
String
Set<String>
Number (including any subtypes and primitive types)
Set<Number>
byte[]
Set<byte[]>
ByteBuffer
Set<ByteBuffer>
Boolean or boolean
null
Map<String,T>, where T can be any type on this list but must not
induce any circular reference
List<T>, where T can be any type on this list but must not induce
any circular reference
|
static java.lang.String |
valToString(java.lang.Object val)
Returns the string representation of the given value; or null if the
value is null.
|
static InternalUtils |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static InternalUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static InternalUtils[] values()
for (InternalUtils c : InternalUtils.values()) System.out.println(c);
public static InternalUtils valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static java.util.List<Item> toItemList(java.util.List<java.util.Map<java.lang.String,AttributeValue>> items)
Item
's given the low level
list of item information.public static java.util.Map<java.lang.String,AttributeValue> toAttributeValues(Item item)
Item
into the low-level representation;
or null if the input is null.public static java.util.Map<java.lang.String,AttributeValue> fromSimpleMap(java.util.Map<java.lang.String,java.lang.Object> map)
public static java.util.Map<java.lang.String,AttributeValueUpdate> toAttributeValueUpdate(java.util.List<AttributeUpdate> attributesToUpdate)
AttributeUpdate
into the low-level
representation; or null if the input is null.public static AttributeValue toAttributeValue(java.lang.Object value)
representation.
value
- the given value which can be one of the followings:
java.lang.UnsupportedOperationException
- if the input object type is not supportedpublic static java.util.List<java.lang.Object> toSimpleList(java.util.List<AttributeValue> attrValues)
AttributeValue
into a list of
simple values. Each value in the returned list can be one of the
followings:
public static <T> java.util.List<T> toSimpleListValue(java.util.List<AttributeValue> values)
AttributeValue
into a list of values of the same type T.
Each value in the returned list can be one of the followings:
public static <T> java.util.Map<java.lang.String,T> toSimpleMapValue(java.util.Map<java.lang.String,AttributeValue> values)
public static java.lang.String valToString(java.lang.Object val)
BigDecimal
it will be the string
representation without an exponent field.static <T> T toSimpleValue(AttributeValue value)
AttributeValue
into a simple value,
which can be one of the followings:
java.lang.IllegalArgumentException
- if an empty AttributeValue
value is specifiedpublic static java.lang.Integer minimum(java.lang.Integer one, java.lang.Integer two)
public static java.util.Map<java.lang.String,ExpectedAttributeValue> toExpectedAttributeValueMap(java.util.Collection<Expected> expectedSet)
Expected
.public static java.util.Map<java.lang.String,Condition> toAttributeConditionMap(java.util.Collection<? extends Filter<?>> filters)
Filter
.public static AttributeValue[] toAttributeValues(java.lang.Object[] values)
public static java.util.Map<java.lang.String,AttributeValue> toAttributeValueMap(java.util.Collection<KeyAttribute> primaryKey)
public static java.util.Map<java.lang.String,AttributeValue> toAttributeValueMap(PrimaryKey primaryKey)
public static java.util.Map<java.lang.String,AttributeValue> toAttributeValueMap(KeyAttribute... primaryKey)
public static java.math.BigDecimal toBigDecimal(java.lang.Number n)
public static java.util.Set<java.math.BigDecimal> toBigDecimalSet(java.lang.Number... val)
public static java.util.Set<java.math.BigDecimal> toBigDecimalSet(java.util.Set<java.lang.Number> vals)
public static <X extends AmazonWebServiceRequest> X applyUserAgent(X request)
public static void rejectNullValue(java.lang.Object val)
public static void rejectNullInput(java.lang.Object input)
public static void rejectEmptyInput(java.lang.Object[] input)
public static void rejectNullOrEmptyInput(java.lang.Object[] input)
public static void checkInvalidAttrName(java.lang.String attrName)
public static void checkInvalidAttribute(java.lang.String attrName, java.lang.Object val)