Interface MutableJythonMap

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void __delitem__​(org.python.core.PyObject pyKey)
      Remove pyKey from the map.
      void __setitem__​(org.python.core.PyObject pyKey, org.python.core.PyObject pyValue)
      Update the map at pyKey with new value pyValue
      void clear()
      Set every value in this mapping to null.
      org.python.core.PyObject pop​(org.python.core.PyObject pyKey)
      Returns the value specified by pyKey in the mapping, and deletes that entry.
      org.python.core.PyObject pop​(org.python.core.PyObject pyKey, org.python.core.PyObject def)
      Returns the value specified by pyKey in the mapping, and deletes that entry.
      org.python.core.PyObject popitem()
      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.PyObject setdefault​(org.python.core.PyObject pyKey)
      Returns the value of pyKey if it is already present in the map.
      org.python.core.PyObject setdefault​(org.python.core.PyObject pyKey, org.python.core.PyObject def)
      Returns the value of pyKey if it is already present in the map.
      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
    • 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.PyException
        Returns the value specified by pyKey in the mapping, and deletes that entry.
        Throws:
        org.python.core.PyException - Py.KeyError if 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 by pyKey in the mapping, and deletes that entry. If the entry is not present, returns def.
      • popitem

        org.python.core.PyObject popitem()
                                  throws org.python.core.PyException,
                                         org.python.core.PyIgnoreMethodTag
        Returns 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.PyException
        org.python.core.PyIgnoreMethodTag
      • setdefault

        org.python.core.PyObject setdefault​(org.python.core.PyObject pyKey)
        Returns the value of pyKey if it is already present in the map. If it is not, the value is added to the map with a default value of Py.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 of pyKey if it is already present in the map. If it is not, the value is added to the map with def, 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 args
        keywords - 1:1 with arguments
      • __setitem__

        void __setitem__​(org.python.core.PyObject pyKey,
                         org.python.core.PyObject pyValue)
        Update the map at pyKey with new value pyValue
      • __delitem__

        void __delitem__​(org.python.core.PyObject pyKey)
        Remove pyKey from the map.