我正在研究一个大型项目,其中我想使用的函数,接受列表
我正在接收列表<对象在我想转换List><对象在List>
public class Object {
int x;
string str;
float f;
}
您可以使用DSLContext.newResult()
和DSLContext.newRecord()
在内存中创建Result
值,如下所示:
Field<Integer> x = ...;
Field<String> str = ...;
Field<Float> f = ...;
Result<Record3<Integer, String, Float>> r = ctx.newResult(x, str, f);
for (Object o : list)
r.add(ctx.newRecord(x, str, f).values(o.x, o.str, o.f));