Top Description Methods
org.python.core

public Interface DictPyObject

extends CraftedPyObject
Known Direct Implementers
org.python.core.PyFloat.Derived, org.python.core.PyFunction, org.python.core.PyLong.Derived, org.python.core.PyModule, org.python.core.PyType
Imports
java.util.Map

Python objects that have instance dictionaries implement this interface.

Method Summary

Modifier and TypeMethod and Description
public Map<Object, Object>

Returns:

a mapping to treat like a dictionary (not null).
getDict
()

The dictionary of the instance, (not necessarily a Python dict or writable.

Inherited from org.python.core.CraftedPyObject:
getType

Method Detail

getDictback to summary
public Map<Object, Object> getDict()

The dictionary of the instance, (not necessarily a Python dict or writable. If the returned Map is not writable, it should throw a Java UnsupportedOperationException on attempts to modify it.

Implementation Specification

A class that implements PyObjectDict should always return a mapping, which may be Collections.emptyMap() if the instance dictionary is intended to be permanently empty.

Returns:Map<Object, Object>

a mapping to treat like a dictionary (not null).