/** * Associate UNDEFINED with the given key. * * @param key The key to associate UNDEFINED with. * * @return The receiver. */ public V8Object addUndefined(final String key) { v8.checkThread(); checkReleased(); v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); return this; }
/** * Adds a key value pair to the receiver where the value is a String. * * @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 String 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.add(v8.getV8RuntimePtr(), objectHandle, key, value); } 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; }
/** * Associate UNDEFINED with the given key. * * @param key The key to associate UNDEFINED with. * * @return The receiver. */ public V8Object addUndefined(final String key) { v8.checkThread(); checkReleased(); v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); return this; }
/** * Adds a key value pair to the receiver where the value is a String. * * @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 String 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.add(v8.getV8RuntimePtr(), objectHandle, key, value); } 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; }
/** * Associate UNDEFINED with the given key. * * @param key The key to associate UNDEFINED with. * * @return The receiver. */ public V8Object addUndefined(final String key) { v8.checkThread(); checkReleased(); v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); return this; }
/** * Associate UNDEFINED with the given key. * * @param key The key to associate UNDEFINED with. * * @return The receiver. */ public V8Object addUndefined(final String key) { v8.checkThread(); checkReleased(); v8.addUndefined(v8.getV8RuntimePtr(), objectHandle, key); return this; }
/** * Adds a key value pair to the receiver where the value is a String. * * @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 String 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.add(v8.getV8RuntimePtr(), objectHandle, key, value); } return this; }
/** * Adds a key value pair to the receiver where the value is a String. * * @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 String 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.add(v8.getV8RuntimePtr(), objectHandle, key, value); } 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; }