@Override
    public boolean addAll(Collection<? extends T> collection) {
        int oldSize = size();
        boolean added = super.addAll(collection);
        if (added) {
            notifyAdd(oldSize, size() - oldSize);
        }
        return added;
    }
An {@link ObservableList} implementation using ArrayList as an implementation.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/obs/ObservableArrayList.java