/** * Appends the JSON representation of the specified string to the end of this array. * * @param value * the string to add to the array * @return the array itself, to enable method chaining */ public JsonArray add(String value) { values.add(Json.value(value)); return this; }
/** * Returns a JsonValue instance that represents the given string. * * @param string * the string to get a JSON representation for * @return a JSON value that represents the given string * @deprecated Use <code>Json.value()</code> instead */ @Deprecated public static JsonValue valueOf(String string) { return Json.value(string); }
/** * Returns a JsonValue instance that represents the given <code>boolean</code> value. * * @param value * the value to get a JSON representation for * @return a JSON value that represents the given value * @deprecated Use <code>Json.value()</code> instead */ @Deprecated public static JsonValue valueOf(boolean value) { return Json.value(value); }
/** * Appends the JSON representation of the specified <code>float</code> value to the end of this * array. * * @param value * the value to add to the array * @return the array itself, to enable method chaining */ public JsonArray add(float value) { values.add(Json.value(value)); return this; }
/** * Appends the JSON representation of the specified <code>double</code> value to the end of this * array. * * @param value * the value to add to the array * @return the array itself, to enable method chaining */ public JsonArray add(double value) { values.add(Json.value(value)); return this; }
/** * Returns a JsonValue instance that represents the given <code>int</code> value. * * @param value * the value to get a JSON representation for * @return a JSON value that represents the given value * @deprecated Use <code>Json.value()</code> instead */ @Deprecated public static JsonValue valueOf(int value) { return Json.value(value); }
/** * Returns a JsonValue instance that represents the given <code>float</code> value. * * @param value * the value to get a JSON representation for * @return a JSON value that represents the given value * @deprecated Use <code>Json.value()</code> instead */ @Deprecated public static JsonValue valueOf(float value) { return Json.value(value); }
/** * Appends the JSON representation of the specified <code>long</code> value to the end of this * array. * * @param value * the value to add to the array * @return the array itself, to enable method chaining */ public JsonArray add(long value) { values.add(Json.value(value)); return this; }
/** * Appends the JSON representation of the specified <code>boolean</code> value to the end of this * array. * * @param value * the value to add to the array * @return the array itself, to enable method chaining */ public JsonArray add(boolean value) { values.add(Json.value(value)); return this; }
/** * Returns a JsonValue instance that represents the given <code>long</code> value. * * @param value * the value to get a JSON representation for * @return a JSON value that represents the given value * @deprecated Use <code>Json.value()</code> instead */ @Deprecated public static JsonValue valueOf(long value) { return Json.value(value); }
/** * Returns a JsonValue instance that represents the given <code>double</code> value. * * @param value * the value to get a JSON representation for * @return a JSON value that represents the given value * @deprecated Use <code>Json.value()</code> instead */ @Deprecated public static JsonValue valueOf(double value) { return Json.value(value); }
/** * Appends the JSON representation of the specified <code>int</code> value to the end of this * array. * * @param value * the value to add to the array * @return the array itself, to enable method chaining */ public JsonArray add(int value) { values.add(Json.value(value)); return this; }
/** * Replaces the element at the specified position in this array with the JSON representation of * the specified string. * * @param index * the index of the array element to replace * @param value * the string to be stored at the specified array position * @return the array itself, to enable method chaining * @throws IndexOutOfBoundsException * if the index is out of range, i.e. <code>index < 0</code> or * <code>index >= size</code> */ public JsonArray set(int index, String value) { values.set(index, Json.value(value)); return this; }
/** * Replaces the element at the specified position in this array with the JSON representation of * the specified <code>double</code> value. * * @param index * the index of the array element to replace * @param value * the value to be stored at the specified array position * @return the array itself, to enable method chaining * @throws IndexOutOfBoundsException * if the index is out of range, i.e. <code>index < 0</code> or * <code>index >= size</code> */ public JsonArray set(int index, double value) { values.set(index, Json.value(value)); return this; }
/** * Replaces the element at the specified position in this array with the JSON representation of * the specified <code>int</code> value. * * @param index * the index of the array element to replace * @param value * the value to be stored at the specified array position * @return the array itself, to enable method chaining * @throws IndexOutOfBoundsException * if the index is out of range, i.e. <code>index < 0</code> or * <code>index >= size</code> */ public JsonArray set(int index, int value) { values.set(index, Json.value(value)); return this; }
/** * Replaces the element at the specified position in this array with the JSON representation of * the specified <code>long</code> value. * * @param index * the index of the array element to replace * @param value * the value to be stored at the specified array position * @return the array itself, to enable method chaining * @throws IndexOutOfBoundsException * if the index is out of range, i.e. <code>index < 0</code> or * <code>index >= size</code> */ public JsonArray set(int index, long value) { values.set(index, Json.value(value)); return this; }
/** * Replaces the element at the specified position in this array with the JSON representation of * the specified <code>boolean</code> value. * * @param index * the index of the array element to replace * @param value * the value to be stored at the specified array position * @return the array itself, to enable method chaining * @throws IndexOutOfBoundsException * if the index is out of range, i.e. <code>index < 0</code> or * <code>index >= size</code> */ public JsonArray set(int index, boolean value) { values.set(index, Json.value(value)); return this; }
public void timeValueOfLong(int reps) { for (int i = 0; i < reps; i++) { checkValue(Json.value(23l)); } }
public void timeValueOfInt(int reps) { for (int i = 0; i < reps; i++) { checkValue(Json.value(23)); } }
private static JsonValue extractSimpleName(JsonObject caliperResults) { String name = caliperResults.get("run").asObject().get("benchmarkName").asString(); return Json.value(name.replaceFirst(".*\\.", "")); }