public UpdateItemSpec 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; }
public PutItemSpec 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; }
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; }
new LinkedHashMap<String, ExpectedAttributeValue>(); for (Expected expected : expectedSet) { final String attr = expected.getAttribute(); final Object[] values = expected.getValues(); ExpectedAttributeValue eav = new ExpectedAttributeValue(); if (op == null) { throw new IllegalArgumentException( "Comparison operator for attribute " + expected.getAttribute() + " must be specified");
public PutItemSpec 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; }
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; }
public UpdateItemSpec 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; }
new LinkedHashMap<String, ExpectedAttributeValue>(); for (Expected expected : expectedSet) { final String attr = expected.getAttribute(); final Object[] values = expected.getValues(); ExpectedAttributeValue eav = new ExpectedAttributeValue(); if (op == null) { throw new IllegalArgumentException( "Comparison operator for attribute " + expected.getAttribute() + " must be specified");