public Set<BigDecimal> getNumberSet(String attrName) {
        Object val = attributes.get(attrName);
        if (val == null)
            return null;
        Set<BigDecimal> numSet = new LinkedHashSet<BigDecimal>();
        if (val instanceof Collection) {
            Collection<?> col = (Collection<?>) val;
            if (col.size() == 0)
                return numSet;
            for (Object element: col) {
                BigDecimal bd = toBigDecimal(element);
                if (!numSet.add(bd))
                    throw new IncompatibleTypeException(val.getClass()
                        + " cannot be converted into a set of BigDecimal's because of duplicate elements");
            }
            return numSet;
        } else if (val instanceof BigDecimal) {
            numSet.add((BigDecimal)val);
            return numSet;
        } else {
            numSet.add(new BigDecimal(val.toString()));
            return numSet;
        }
    }
Returns the value of the specified attribute in the current item as a set
of BigDecimal's; or null if the attribute either doesn't exist or the
attribute value is null.

@throws NumberFormatException
            if the attribute involves a value that is not a valid
            representation of a {@code BigDecimal}.

@throws IncompatibleTypeException
            if the attribute value cannot be converted into a set of
            <code>BigDecimal</code>'s because of duplicate elements

@see #isNull(String) #isNull(String) to check if the attribute value is
     null.
@see #isPresent(String) #isPresent(String) to check if the attribute
     value is present.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/Item.java