public ListShort getListShort(String string) { JsonArray array = getJsonArray(string); return toListShort(array); }
public List<Object> getColumnValues(String string, List<Class<?>> types) { JsonArray array = getJsonArray(string); List<Object> result = new ArrayList<>(); for (int i = 0; i < types.size(); i++) { Class<?> type = types.get(i); if (String.class.equals(type)) { result.add(toListString(array.getJsonArray(i))); } else if (double.class.equals(type)) { result.add(toListDouble(array.getJsonArray(i))); } else if (float.class.equals(type)) { result.add(toListFloat(array.getJsonArray(i))); } else if (long.class.equals(type)) { result.add(toListLong(array.getJsonArray(i))); } else if (int.class.equals(type)) { result.add(toListInt(array.getJsonArray(i))); } else if (short.class.equals(type)) { result.add(toListShort(array.getJsonArray(i))); } else if (byte.class.equals(type)) { result.add(toListByte(array.getJsonArray(i))); } else if (Instant.class.equals(type)) { result.add(toListTimestamp(array.getJsonArray(i))); } else { throw new IllegalArgumentException("Column type " + type + " not supported"); } } return result; }