/** * Converts a low-level <code>AttributeValue</code> into a simple value, * which can be one of the followings: * * <ul> * <li>String</li> * <li>Set<String></li> * <li>Number (including any subtypes and primitive types)</li> * <li>Set<Number></li> * <li>byte[]</li> * <li>Set<byte[]></li> * <li>ByteBuffer</li> * <li>Set<ByteBuffer></li> * <li>Boolean or boolean</li> * <li>null</li> * <li>Map<String,T>, where T can be any type on this list but must not * induce any circular reference</li> * <li>List<T>, where T can be any type on this list but must not induce * any circular reference</li> * </ul> * * @throws IllegalArgumentException if an empty <code>AttributeValue</code> value is specified */ static <T> T toSimpleValue(AttributeValue value) { return ItemUtils.toSimpleValue(value); }
public static <T> Map<String, T> toSimpleMapValue( Map<String, AttributeValue> values) { if (values == null) { return null; } Map<String, T> result = new LinkedHashMap<String, T>(values.size()); for (Map.Entry<String, AttributeValue> entry : values.entrySet()) { T t = toSimpleValue(entry.getValue()); result.put(entry.getKey(), t); } return result; }
List<Object> result = new ArrayList<Object>(attrValues.size()); for (AttributeValue attrValue : attrValues) { Object value = toSimpleValue(attrValue); result.add(value);
T t = toSimpleValue(v); result.add(t);
/** * Converts a low-level <code>AttributeValue</code> into a simple value, * which can be one of the followings: * * <ul> * <li>String</li> * <li>Set<String></li> * <li>Number (including any subtypes and primitive types)</li> * <li>Set<Number></li> * <li>byte[]</li> * <li>Set<byte[]></li> * <li>ByteBuffer</li> * <li>Set<ByteBuffer></li> * <li>Boolean or boolean</li> * <li>null</li> * <li>Map<String,T>, where T can be any type on this list but must not * induce any circular reference</li> * <li>List<T>, where T can be any type on this list but must not induce * any circular reference</li> * </ul> * * @throws IllegalArgumentException if an empty <code>AttributeValue</code> value is specified */ static <T> T toSimpleValue(AttributeValue value) { return ItemUtils.toSimpleValue(value); }
public static <T> Map<String, T> toSimpleMapValue( Map<String, AttributeValue> values) { if (values == null) { return null; } Map<String, T> result = new LinkedHashMap<String, T>(values.size()); for (Map.Entry<String, AttributeValue> entry : values.entrySet()) { T t = toSimpleValue(entry.getValue()); result.put(entry.getKey(), t); } return result; }
T t = toSimpleValue(v); result.add(t);
List<Object> result = new ArrayList<Object>(attrValues.size()); for (AttributeValue attrValue : attrValues) { Object value = toSimpleValue(attrValue); result.add(value);