public class Storage extends SimpleScriptable
Constructor and Description |
---|
Storage()
Public default constructor only for the prototype.
|
Storage(Window window,
Map<String,String> store)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all items.
|
Object |
get(String name,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Gets a named property from the object.
|
Object |
getItem(String key)
Returns the value of the specified key.
|
int |
getLength()
Returns the length property.
|
String |
key(int index)
Returns the key of the specified index.
|
void |
put(String name,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start,
Object value) |
void |
removeItem(String key)
Removes the specified key.
|
void |
setItem(String key,
String data)
Sets the item value.
|
clone, equivalentValues, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
defineFunctionProperties, defineProperty, getClassName, setClassName, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, size
public void put(String name, net.sourceforge.htmlunit.corejs.javascript.Scriptable start, Object value)
put
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
put
in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
public Object get(String name, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
SimpleScriptable.getWithPreemption(String)
.
For fallback case just implement ScriptableWithFallbackGetter
.
get
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
get
in class SimpleScriptable
public int getLength()
public void removeItem(String key)
key
- the item keypublic String key(int index)
index
- the indexpublic Object getItem(String key)
key
- the item keypublic void setItem(String key, String data)
key
- the item keydata
- the valuepublic void clear()
Copyright © 2002–2017 Gargoyle Software Inc.. All rights reserved.