package net.ktnx.mobileledger.utils;
import android.os.Build;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
import android.util.Log;
import java.util.Collection;
import java.util.function.UnaryOperator;
import java.util.stream.Stream;
-public class ObservableList<T> extends Observable {
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
+
+public class ObservableList<T> extends Observable implements List<T> {
private List<T> list;
public ObservableList(List<T> list) {
this.list = list;
public boolean contains(@Nullable Object o) {
return list.contains(o);
}
+ @NonNull
public Iterator<T> iterator() {
return list.iterator();
}
if (result) forceNotify();
return result;
}
+ public T removeQuietly(int index) {
+ return list.remove(index);
+ }
public boolean containsAll(@NonNull Collection<?> c) {
return list.containsAll(c);
}
if (result) forceNotify();
return result;
}
+ public boolean addAllQuietly(int index, Collection<? extends T> c) {
+ return list.addAll(index, c);
+ }
public boolean removeAll(@NonNull Collection<?> c) {
boolean result = list.removeAll(c);
if (result) forceNotify();