public DeleteItemSpec withExpected(Collection<Expected> expected) {
        if (expected == null) {
            this.expected = null;
            return this;
        }
        Set<String> names = new LinkedHashSet<String>();
        for (Expected e: expected)
            names.add(e.getAttribute());
        if (names.size() != expected.size()) {
            throw new IllegalArgumentException(
                "attribute names must not duplicate in the list of expected");
        }
        this.expected = Collections.unmodifiableCollection(expected);
        return this;
    }
Full parameter specification for the DeleteItem API.
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/spec/DeleteItemSpec.java