如何在Scala中实例化Java通用内部类?

时间:2016-03-17 01:52:15

标签: java scala

SELECT t.*
FROM (SELECT COUNT(id) AS id_cnt, lead_id
      FROM calls_leads
      GROUP BY lead_id) t INNER JOIN leads_cstm l
        ON l.id_c = t.id_cnt

然后,如果我想在scala中实例化// Parent.java public class Parent { public class Tuple3<X, Y, Z> { public final X x; public final Y y; public final Z z; public Tuple3(X x, Y y, Z z) { this.x = x; this.y = y; this.z = z; } public X _1() { return x; } public Y _2() { return y; } public Z _3() { return z; } } .... } 对象,我该怎么写?

1 个答案:

答案 0 :(得分:0)

基本上与您在Java中使用的方式相同。

val outer = new Parent
val inner = new outer.Tuple3("hi", "there", true)
相关问题