Class ScriptableLinkedHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.springframework.extensions.webscripts.ScriptableLinkedHashMap<K,V>
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,,V> org.mozilla.javascript.Scriptable,ScriptableMap<K,V>
Implementation of a Scriptable Map. This is the best choice for maps that want to represent
JavaScript associative arrays - allowing access via key and integer index. It maintains and
respects insertion order of the elements and allows either string or integer keys.
- Author:
- Kevin Roast
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionScriptableLinkedHashMap(int initialCapacity) ScriptableLinkedHashMap(Map<K, V> source) -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int index) voidget(int index, org.mozilla.javascript.Scriptable start) getDefaultValue(Class hint) Object[]getIds()org.mozilla.javascript.Scriptableorg.mozilla.javascript.Scriptablebooleanhas(int index, org.mozilla.javascript.Scriptable start) booleanbooleanhasInstance(org.mozilla.javascript.Scriptable instance) voidvoidvoidsetParentScope(org.mozilla.javascript.Scriptable parent) voidsetPrototype(org.mozilla.javascript.Scriptable prototype) Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Constructor Details
-
ScriptableLinkedHashMap
public ScriptableLinkedHashMap() -
ScriptableLinkedHashMap
public ScriptableLinkedHashMap(int initialCapacity) -
ScriptableLinkedHashMap
-
-
Method Details
-
getClassName
- Specified by:
getClassNamein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.getClassName()
-
get
- Specified by:
getin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.get(java.lang.String, org.mozilla.javascript.Scriptable)
-
get
- Specified by:
getin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.get(int, org.mozilla.javascript.Scriptable)
-
has
- Specified by:
hasin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.has(java.lang.String, org.mozilla.javascript.Scriptable)
-
has
public boolean has(int index, org.mozilla.javascript.Scriptable start) - Specified by:
hasin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.has(int, org.mozilla.javascript.Scriptable)
-
put
- Specified by:
putin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.put(java.lang.String, org.mozilla.javascript.Scriptable, java.lang.Object)
-
put
- Specified by:
putin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.put(int, org.mozilla.javascript.Scriptable, java.lang.Object)
-
delete
- Specified by:
deletein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.delete(java.lang.String)
-
delete
public void delete(int index) - Specified by:
deletein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.delete(int)
-
getPrototype
public org.mozilla.javascript.Scriptable getPrototype()- Specified by:
getPrototypein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.getPrototype()
-
setPrototype
public void setPrototype(org.mozilla.javascript.Scriptable prototype) - Specified by:
setPrototypein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.setPrototype(org.mozilla.javascript.Scriptable)
-
getParentScope
public org.mozilla.javascript.Scriptable getParentScope()- Specified by:
getParentScopein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.getParentScope()
-
setParentScope
public void setParentScope(org.mozilla.javascript.Scriptable parent) - Specified by:
setParentScopein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.setParentScope(org.mozilla.javascript.Scriptable)
-
getIds
- Specified by:
getIdsin interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.getIds()
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.getDefaultValue(java.lang.Class)
-
hasInstance
public boolean hasInstance(org.mozilla.javascript.Scriptable instance) - Specified by:
hasInstancein interfaceorg.mozilla.javascript.Scriptable- See Also:
-
Scriptable.hasInstance(org.mozilla.javascript.Scriptable)
-