Interface MutableJythonMap
-
- All Known Implementing Classes:
AbstractMutableJythonMap,PropertyTreeScriptWrapper,PropertyTreeScriptWrapper.ObjectWrapper,PyJsonObjectAdapter
public interface MutableJythonMap
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void__delitem__(org.python.core.PyObject pyKey)RemovepyKeyfrom the map.void__setitem__(org.python.core.PyObject pyKey, org.python.core.PyObject pyValue)Update the map atpyKeywith new valuepyValuevoidclear()Set every value in this mapping to null.org.python.core.PyObjectpop(org.python.core.PyObject pyKey)Returns the value specified bypyKeyin the mapping, and deletes that entry.org.python.core.PyObjectpop(org.python.core.PyObject pyKey, org.python.core.PyObject def)Returns the value specified bypyKeyin the mapping, and deletes that entry.org.python.core.PyObjectpopitem()Returns an arbitrary (not guaranteed random, nor guaranteed last) item (PyTuple key: value pair) from the dictionary, and removes that item from the mapping.org.python.core.PyObjectsetdefault(org.python.core.PyObject pyKey)Returns the value ofpyKeyif it is already present in the map.org.python.core.PyObjectsetdefault(org.python.core.PyObject pyKey, org.python.core.PyObject def)Returns the value ofpyKeyif it is already present in the map.voidupdate(org.python.core.PyObject[] args, java.lang.String[] keywords)Updates this mapping, one of three possible ways: with a set of keyword arguments; eg{"a": 1}.update(b=2, c=3) == {"a": 1, "b": 2, * "c": 3}with another dictionary directly with an iterable sequence of key:value pairs
-
-
-
Method Detail
-
clear
void clear()
Set every value in this mapping to null.
-
pop
org.python.core.PyObject pop(org.python.core.PyObject pyKey) throws org.python.core.PyExceptionReturns the value specified bypyKeyin the mapping, and deletes that entry.- Throws:
org.python.core.PyException-Py.KeyErrorif the pyKey is not present in the map.
-
pop
org.python.core.PyObject pop(org.python.core.PyObject pyKey, org.python.core.PyObject def)Returns the value specified bypyKeyin the mapping, and deletes that entry. If the entry is not present, returnsdef.
-
popitem
org.python.core.PyObject popitem() throws org.python.core.PyException, org.python.core.PyIgnoreMethodTagReturns an arbitrary (not guaranteed random, nor guaranteed last) item (PyTuple key: value pair) from the dictionary, and removes that item from the mapping.- Throws:
org.python.core.PyExceptionorg.python.core.PyIgnoreMethodTag
-
setdefault
org.python.core.PyObject setdefault(org.python.core.PyObject pyKey)
Returns the value ofpyKeyif it is already present in the map. If it is not, the value is added to the map with a default value ofPy.None, and returns the value added to the map.
-
setdefault
org.python.core.PyObject setdefault(org.python.core.PyObject pyKey, org.python.core.PyObject def)Returns the value ofpyKeyif it is already present in the map. If it is not, the value is added to the map withdef, and returns the value added to the map.
-
update
void update(org.python.core.PyObject[] args, java.lang.String[] keywords)Updates this mapping, one of three possible ways:- with a set of keyword arguments; eg
{"a": 1}.update(b=2, c=3) == {"a": 1, "b": 2, * "c": 3} - with another dictionary directly
- with an iterable sequence of key:value pairs
- Parameters:
args- arguments passed to this object. The second and third methods described above will pass a single PyObject in argskeywords- 1:1 with arguments
- with a set of keyword arguments; eg
-
__setitem__
void __setitem__(org.python.core.PyObject pyKey, org.python.core.PyObject pyValue)Update the map atpyKeywith new valuepyValue
-
__delitem__
void __delitem__(org.python.core.PyObject pyKey)
RemovepyKeyfrom the map.
-
-