Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
299 views
in Technique[技术] by (71.8m points)

java 中的接口类型的问题


    public final i a(final rx.c.b<? super T> bVar, final rx.c.b<Throwable> bVar2) {
        if (bVar == null) {
            throw new IllegalArgumentException("onNext can not be null");
        } else if (bVar2 != null) {
            return b((h<? super T>) new h<T>() {
                public final void onCompleted() {
                }

                public final void onError(Throwable th) {
                    bVar2.call(th);
                }

                public final void onNext(T t) {
                    bVar.call(t);
                }
            });
        } else {
            throw new IllegalArgumentException("onError can not be null");
        }
    }

    public final i a(final d<? super T> dVar) {

package rx.c;

/ compiled from: MusicApp /
public interface b<T1> {

void call(T1 t1);

}
我想问一下这里的接口怎么还设置一个T1 类型呢?接口不是没有类型之分的吗?

image.png
这个call()
我再这里搜索他的用例没搜到这是怎么回事?都是调用的 没有实现


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

看定义:

rx.c.b<Throwable> bVar2

查看rx.c.b这个类的call方法。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...