/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>long</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to replace * @param value * the value to set to the member * @return the object itself, to enable method chaining */ public JsonObject set(String name, long value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>boolean</code> value. If this object does not contain a member with this name, * a new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, boolean value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>float</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, float value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>double</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, double value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>int</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to replace * @param value * the value to set to the member * @return the object itself, to enable method chaining */ public JsonObject set(String name, int value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified string. If this object does not contain a member with this name, a new member is * added at the end of the object. If this object contains multiple members with this name, only * the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, String value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>int</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to replace * @param value * the value to set to the member * @return the object itself, to enable method chaining */ public JsonObject set(String name, int value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>long</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to replace * @param value * the value to set to the member * @return the object itself, to enable method chaining */ public JsonObject set(String name, long value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>float</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, float value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>double</code> value. If this object does not contain a member with this name, a * new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, double value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified <code>boolean</code> value. If this object does not contain a member with this name, * a new member is added at the end of the object. If this object contains multiple members with * this name, only the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, boolean value) { set(name, valueOf(value)); return this; }
/** * Sets the value of the member with the specified name to the JSON representation of the * specified string. If this object does not contain a member with this name, a new member is * added at the end of the object. If this object contains multiple members with this name, only * the last one is changed. * <p> * This method should <strong>only be used to modify existing objects</strong>. To fill a new * object with members, the method <code>add(name, value)</code> should be preferred which is much * faster (as it does not need to search for existing members). * </p> * * @param name * the name of the member to add * @param value * the value of the member to add * @return the object itself, to enable method chaining */ public JsonObject set(String name, String value) { set(name, valueOf(value)); return this; }