@Test public void isNumericArray1() { assertThat(isNumericArray(parseJson(integerArray)), equalTo(true)); assertThat(isNumericArray(parseJson(doubleArray)), equalTo(true)); assertThat(isNumericArray(parseJson(stringArray)), equalTo(false)); assertThat(isNumericArray(parseJson(mixedArray)), equalTo(false)); }
public static boolean isNumericArray(JsonArray array) { for (JsonValue value : array) { if (!(value instanceof JsonNumber)) { return false; } } return true; }
JsonArrays { public static boolean isNumericArray(JsonArray array) { for (JsonValue value : array) { if (!(value instanceof JsonNumber)) { return false; } } return true; } }
JsonArrays { public static boolean isNumericArray(JsonArray array) { for (JsonValue value : array) { if (!(value instanceof JsonNumber)) { return false; } } return true; }  }
JsonArrays { public static boolean isNumericArray(JsonArray array) { for (JsonValue value : array) { if (!(value instanceof JsonNumber)) { return false; } } return true; }  static boolean isNumericArray(JsonArray array); static boolean isStringArray(JsonArray array); static ListDouble toListDouble(JsonArray array); static ListFloat toListFloat(JsonArray array); static ListLong toListLong(JsonArray array); static ListInt toListInt(JsonArray array); static ListShort toListShort(JsonArray array); static ListByte toListByte(JsonArray array); static List<String> toListString(JsonArray array); static List<Instant> toListTimestamp(JsonArray array); static JsonArrayBuilder fromListString(List<String> list); static JsonArrayBuilder fromListTimestamp(List<Instant> list); static JsonArrayBuilder fromListNumber(ListNumber list); }
JsonArrays { public static boolean isNumericArray(JsonArray array) { for (JsonValue value : array) { if (!(value instanceof JsonNumber)) { return false; } } return true; }  static boolean isNumericArray(JsonArray array); static boolean isStringArray(JsonArray array); static ListDouble toListDouble(JsonArray array); static ListFloat toListFloat(JsonArray array); static ListLong toListLong(JsonArray array); static ListInt toListInt(JsonArray array); static ListShort toListShort(JsonArray array); static ListByte toListByte(JsonArray array); static List<String> toListString(JsonArray array); static List<Instant> toListTimestamp(JsonArray array); static JsonArrayBuilder fromListString(List<String> list); static JsonArrayBuilder fromListTimestamp(List<Instant> list); static JsonArrayBuilder fromListNumber(ListNumber list);  }