/** * Put or replace a float value. If the index is greater than the length * of the JSONArray, then null elements will be added as necessary to pad * it out. There are no 'double' values in JSON, so this is passed to * setDouble(value). * * @webref jsonarray:method * @brief Put a float value in the JSONArray * @param index an index value * @param value the value to assign * @return this. * @throws RuntimeException If the index is negative or if the value is * not finite. * @see JSONArray#setInt(int, int) * @see JSONArray#setString(int, String) * @see JSONArray#setBoolean(int, boolean) */ public JSONArray setFloat(int index, float value) { return setDouble(index, value); }
/** * Put or replace a float value. If the index is greater than the length * of the JSONArray, then null elements will be added as necessary to pad * it out. There are no 'double' values in JSON, so this is passed to * setDouble(value). * * @webref jsonarray:method * @brief Put a float value in the JSONArray * @param index an index value * @param value the value to assign * @return this. * @throws RuntimeException If the index is negative or if the value is * not finite. * @see JSONArray#setInt(int, int) * @see JSONArray#setString(int, String) * @see JSONArray#setBoolean(int, boolean) */ public JSONArray setFloat(int index, float value) { return setDouble(index, value); }