【发布时间】:2017-05-20 19:27:28
【问题描述】:
在 kotlin 中有没有一种方法可以创建一个泛型属性而不声明一个类级别的泛型类型?看起来像这样的东西:
interface Generic {
val t: T //I need this type only once, thats why I dont wanna pass in the class level
fun <E> gMethod(e: E) { //This works, so I'm wondering if there's something similiar to properties
}
}
【问题讨论】:
标签: kotlin