package pyspark_cassandra.types;

public class LWRow {
	private String[] fields;
	private Object[] values;

	public LWRow(String[] fields, Object[] values) {
		this.fields = fields;
		this.values = values;
	}

	public String[] getFieldsNames() {
		return fields;
	}

	public Object[] getFieldValues() {
		return values;
	}
}

@@ -27,16 +27,65 @@
 types;%0A%0A
+import java.util.Arrays;%0Aimport java.util.List;%0A%0A
 public c
@@ -264,108 +264,471 @@
 lic 
-String%5B%5D getFieldsNames() %7B%0A%09%09return fields;%0A%09%7D%0A%0A%09public Object%5B%5D getFieldValues() %7B%0A%09%09return values
+LWRow(List%3CString%3E fields, List%3CObject%3E values) %7B%0A%09%09// TODO consider another approach to remove this conceptually unnecessary toArray calls%0A%09%09this(fields.toArray(new String%5Bfields.size()%5D), values.toArray());%0A%09%7D%0A%0A%09public String%5B%5D getFieldsNames() %7B%0A%09%09return fields;%0A%09%7D%0A%0A%09public Object%5B%5D getFieldValues() %7B%0A%09%09return values;%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return %22LWRow %5Bfields=%22 + Arrays.toString(fields) + %22, values=%22 + Arrays.toString(values) + %22%5D%22
 ;%0A%09%7D

support construcing LWRows from lists of fields names and values