On Tuesday, April 14, 2015 at 12:37:01 AM UTC-7, Lukas Eder wrote: > > > 2015-04-13 22:39 GMT+02:00 Ed Erwin <[email protected] <javascript:>>: >> >> OK. That sort-of works and I may do it. It is necessary to also >> suppress "SuspiciousToArrayCall" >> > > That appears to be a vendor-specific suppression. IntelliJ? > >
I found that value in a blog post about IntelliJ, but the same value works in NetBeans. > When you do this, however: >>> >> > public static <T1, T2> Table<Record2<T1, T2>> values(Collection<? extends > Row2<T1, T2>> rows) > public static <T1, T2, T3> Table<Record3<T1, T2, T3>> values(Collection<? > extends Row3<T1, T2, T3>> rows) > > > ... then, the erased argument types don't differ. They're 2x Collection. > Hence, this kind of overload is illegal. > Ok. That is true. It works fine for one method, but if you have multiple methods they have to have separate names like "value2", "values3". So, the following *is* possible. Whether you want to do it is your choice. public static <T1, T2> Table<Record2<T1, T2>> values2(Collection<? extends Row2<T1, T2>> rows) public static <T1, T2, T3> Table<Record3<T1, T2, T3>> values3(Collection<? extends Row3<T1, T2, T3>> rows) -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
