/** * Adds a key value pair to the receiver where the value is a V8Value. * * @param key The key to associate the value with. * @param value The value to add. * * @return The receiver. */ public V8Object add(final String key, final V8Value value) { v8.checkThread(); checkReleased(); v8.checkRuntime(value); if (value == null) { v8.addNull(v8.getV8RuntimePtr(), objectHandle, key); } else if (value.equals(V8.getUndefined())) { v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); } else { v8.addObject(v8.getV8RuntimePtr(), objectHandle, key, value.getHandle()); } return this; }
/** * Pushes a V8Value to the next available spot in the Array. In * particular, this[length] = value; * * @param value The value to push to the array. * * @return The receiver. */ public V8Array push(final V8Value value) { v8.checkThread(); checkReleased(); v8.checkRuntime(value); if (value == null) { v8.addArrayNullItem(v8.getV8RuntimePtr(), getHandle()); } else if (value.equals(V8.getUndefined())) { v8.addArrayUndefinedItem(v8.getV8RuntimePtr(), getHandle()); } else { v8.addArrayObjectItem(v8.getV8RuntimePtr(), getHandle(), value.getHandle()); } return this; }
/** * Adds a key value pair to the receiver where the value is a V8Value. * * @param key The key to associate the value with. * @param value The value to add. * * @return The receiver. */ public V8Object add(final String key, final V8Value value) { v8.checkThread(); checkReleased(); v8.checkRuntime(value); if (value == null) { v8.addNull(v8.getV8RuntimePtr(), objectHandle, key); } else if (value.equals(V8.getUndefined())) { v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); } else { v8.addObject(v8.getV8RuntimePtr(), objectHandle, key, value.getHandle()); } return this; }
/** * Pushes a V8Value to the next available spot in the Array. In * particular, this[length] = value; * * @param value The value to push to the array. * * @return The receiver. */ public V8Array push(final V8Value value) { v8.checkThread(); checkReleased(); v8.checkRuntime(value); if (value == null) { v8.addArrayNullItem(v8.getV8RuntimePtr(), getHandle()); } else if (value.equals(V8.getUndefined())) { v8.addArrayUndefinedItem(v8.getV8RuntimePtr(), getHandle()); } else { v8.addArrayObjectItem(v8.getV8RuntimePtr(), getHandle(), value.getHandle()); } return this; }
/** * Adds a key value pair to the receiver where the value is a V8Value. * * @param key The key to associate the value with. * @param value The value to add. * * @return The receiver. */ public V8Object add(final String key, final V8Value value) { v8.checkThread(); checkReleased(); if (value == null) { v8.addNull(v8.getV8RuntimePtr(), objectHandle, key); } else if (value.equals(V8.getUndefined())) { v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); } else { v8.addObject(v8.getV8RuntimePtr(), objectHandle, key, value.getHandle()); } return this; }
/** * Adds a key value pair to the receiver where the value is a V8Value. * * @param key The key to associate the value with. * @param value The value to add. * * @return The receiver. */ public V8Object add(final String key, final V8Value value) { v8.checkThread(); checkReleased(); if (value == null) { v8.addNull(v8.getV8RuntimePtr(), objectHandle, key); } else if (value.equals(V8.getUndefined())) { v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); } else { v8.addObject(v8.getV8RuntimePtr(), objectHandle, key, value.getHandle()); } return this; }
/** * Pushes a V8Value to the next available spot in the Array. In * particular, this[length] = value; * * @param value The value to push to the array. * * @return The receiver. */ public V8Array push(final V8Value value) { v8.checkThread(); checkReleased(); if (value == null) { v8.addArrayNullItem(v8.getV8RuntimePtr(), getHandle()); } else if (value.equals(V8.getUndefined())) { v8.addArrayUndefinedItem(v8.getV8RuntimePtr(), getHandle()); } else { v8.addArrayObjectItem(v8.getV8RuntimePtr(), getHandle(), value.getHandle()); } return this; }
/** * Pushes a V8Value to the next available spot in the Array. In * particular, this[length] = value; * * @param value The value to push to the array. * * @return The receiver. */ public V8Array push(final V8Value value) { v8.checkThread(); checkReleased(); if (value == null) { v8.addArrayNullItem(v8.getV8RuntimePtr(), getHandle()); } else if (value.equals(V8.getUndefined())) { v8.addArrayUndefinedItem(v8.getV8RuntimePtr(), getHandle()); } else { v8.addArrayObjectItem(v8.getV8RuntimePtr(), getHandle(), value.getHandle()); } return this; }