2021-06-27 20:44:35 +00:00
|
|
|
package j0.l.a;
|
|
|
|
|
|
|
|
import j0.k.b;
|
|
|
|
import j0.l.a.a;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
import rx.Observable;
|
|
|
|
import rx.Subscriber;
|
|
|
|
import rx.functions.Func0;
|
|
|
|
/* compiled from: OnSubscribeToMap */
|
|
|
|
public final class l0<T, K, V> implements Observable.a<Map<K, V>>, Func0<Map<K, V>> {
|
|
|
|
public final Observable<T> i;
|
|
|
|
public final b<? super T, ? extends K> j;
|
|
|
|
public final b<? super T, ? extends V> k;
|
|
|
|
public final Func0<? extends Map<K, V>> l = this;
|
|
|
|
|
|
|
|
/* compiled from: OnSubscribeToMap */
|
|
|
|
public static final class a<T, K, V> extends b<T, Map<K, V>> {
|
|
|
|
public final b<? super T, ? extends K> n;
|
|
|
|
public final b<? super T, ? extends V> o;
|
|
|
|
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: java.util.Map<K, V> */
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
|
|
public a(Subscriber<? super Map<K, V>> subscriber, Map<K, V> map, b<? super T, ? extends K> bVar, b<? super T, ? extends V> bVar2) {
|
|
|
|
super(subscriber);
|
|
|
|
this.k = map;
|
|
|
|
this.j = true;
|
|
|
|
this.n = bVar;
|
|
|
|
this.o = bVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r1v2, resolved type: java.util.Map */
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
|
|
@Override // j0.g
|
|
|
|
public void onNext(T t) {
|
|
|
|
if (!this.m) {
|
|
|
|
try {
|
|
|
|
this.k.put(this.n.call(t), this.o.call(t));
|
|
|
|
} catch (Throwable th) {
|
2021-06-27 20:53:42 +00:00
|
|
|
c.q.a.k.a.a0(th);
|
2021-06-27 20:44:35 +00:00
|
|
|
unsubscribe();
|
|
|
|
onError(th);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.Subscriber
|
|
|
|
public void onStart() {
|
|
|
|
request(Long.MAX_VALUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public l0(Observable<T> observable, b<? super T, ? extends K> bVar, b<? super T, ? extends V> bVar2) {
|
|
|
|
this.i = observable;
|
|
|
|
this.j = bVar;
|
|
|
|
this.k = bVar2;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Func0, java.util.concurrent.Callable
|
|
|
|
public Object call() {
|
|
|
|
return new HashMap();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // rx.functions.Action1
|
|
|
|
public void call(Object obj) {
|
|
|
|
Subscriber subscriber = (Subscriber) obj;
|
|
|
|
try {
|
|
|
|
a aVar = new a(subscriber, (Map) this.l.call(), this.j, this.k);
|
|
|
|
Observable<T> observable = this.i;
|
|
|
|
Subscriber<? super R> subscriber2 = aVar.i;
|
|
|
|
subscriber2.add(aVar);
|
|
|
|
subscriber2.setProducer(new a.C0319a(aVar));
|
|
|
|
observable.j0(aVar);
|
|
|
|
} catch (Throwable th) {
|
2021-06-27 20:53:42 +00:00
|
|
|
c.q.a.k.a.a0(th);
|
2021-06-27 20:44:35 +00:00
|
|
|
subscriber.onError(th);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|