标签:arch arc 有关 pop content 父类 static tracking 接口
public <U> Class<? extends U> asSubclass(Class<U> clazz) {}
eg:
public static <AnyType extends Comparable<? super AnyType>> int binarySearch(AnyType[] a, AnyType x) {}
super AnyType>>就是泛型声明;当中的extends表明AnyType仅仅能是实现Comparable接口的类或子类;Comparable<T>本身就是一个泛型接口。实现的时候要指明泛型类型。Comparable<? super AnyType>中的<? super AnyType>表示详细的泛型类型是AnyType或者AnyType的上层父类类型。
标签:arch arc 有关 pop content 父类 static tracking 接口
原文地址:https://www.cnblogs.com/ldxsuanfa/p/10584068.html