base.ArrayQueryResult Maven / Gradle / Ivy
/**
* Creative commons Attribution-NonCommercial license.
*
* http://creativecommons.org/licenses/by-nc/2.5/au/deed.en_GB
*
* NO WARRANTY IS GIVEN OR IMPLIED, USE AT YOUR OWN RISK.
*/
package base;
public class ArrayQueryResult implements QueryResult {
private String[] values;
public ArrayQueryResult(String[] values) {
this.values = values;
}
public ArrayQueryResult() {
}
public String toString() {
return toJson();
}
public String toJson() {
String result = "[";
for(int j = 0; j < values.length; j++) {
if(j != 0) {
result = result + ",";
}
result = result + "\""+values[j]+"\"";
}
result = result + "]";
return result;
}
public String[] getValues() {
return values;
}
public void setValues(String[] values) {
this.values = values;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy