@Override public boolean addAllUnique(Object[] objects, int start, int end) { return delegate.addAllUnique(objects, start, end); }
@Override public boolean addAllUnique(Collection<? extends E> collection) { return delegate.addAllUnique(collection); }
@Override public boolean addAllUnique(int index, Object[] objects, int start, int end) { return delegate.addAllUnique(index, objects, start, end); }
@Override public boolean addAllUnique(int index, Collection<? extends E> collection) { return delegate.addAllUnique(index, collection); }
/** * Adds each object of the collection to the end of the list. * If {@link #isUnique uniqueness} is required, * duplicates will be {@link #getNonDuplicates removed} from the collection, * which could even result in an empty collection. * This implementation delegates to {@link #addAllUnique(Collection) addAllUnique(Collection)} * after uniqueness checking. * @param collection the collection of objects to be added. * @see #addAllUnique(Collection) */ @Override public boolean addAll(Collection<? extends E> collection) { if (isUnique()) { collection = getNonDuplicates(collection); } return addAllUnique(collection); }
/** * Adds each object of the collection at each successive index in the list * and returns whether any objects were added. * If {@link #isUnique uniqueness} is required, * duplicates will be {@link #getNonDuplicates removed} from the collection, * which could even result in an empty collection. * This implementation delegates to {@link #addAllUnique(int, Collection) addAllUnique(int, Collection)} * after uniqueness checking. * @param index the index at which to add. * @param collection the collection of objects to be added. * @return whether any objects were added. * @see #addAllUnique(int, Collection) */ @Override public boolean addAll(int index, Collection<? extends E> collection) { int size = size(); if (index > size) throw new BasicIndexOutOfBoundsException(index, size); if (isUnique()) { collection = getNonDuplicates(collection); } return addAllUnique(index, collection); }