public boolean addAll(Collection<? extends E> c) { throwExceptionIfNull(c); List<Data> valueList = new ArrayList<Data>(c.size()); final NodeEngine nodeEngine = getNodeEngine(); for (E e : c) { throwExceptionIfNull(e); valueList.add(nodeEngine.toData(e)); } final CollectionAddAllOperation operation = new CollectionAddAllOperation(name, valueList); final Boolean result = invoke(operation); return result; }
public boolean containsAll(Collection<?> c) { throwExceptionIfNull(c); Set<Data> valueSet = new HashSet<Data>(c.size()); final NodeEngine nodeEngine = getNodeEngine(); for (Object o : c) { throwExceptionIfNull(o); valueSet.add(nodeEngine.toData(o)); } final CollectionContainsOperation operation = new CollectionContainsOperation(name, valueSet); final Boolean result = invoke(operation); return result; }
private boolean compareAndRemove(boolean retain, Collection<?> c) { throwExceptionIfNull(c); Set<Data> valueSet = new HashSet<Data>(c.size()); final NodeEngine nodeEngine = getNodeEngine(); for (Object o : c) { throwExceptionIfNull(o); valueSet.add(nodeEngine.toData(o)); } final CollectionCompareAndRemoveOperation operation = new CollectionCompareAndRemoveOperation(name, retain, valueSet); final Boolean result = invoke(operation); return result; }