public class Storage extends HtmlUnitScriptable
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, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, 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 HtmlUnitScriptable
public Object get(String name, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
HtmlUnitScriptable.getWithPreemption(String)
.
get
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
get
in class HtmlUnitScriptable
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–2022 Gargoyle Software Inc.. All rights reserved.