| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final LoadingCache | |
| private PyObject | defaultFactory
This attribute is used by the __missing__ method; it is initialized from the first argument to the constructor, if present, or to None, if absent. |
| public static final PyType |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PyObject | __finditem__(PyObject
the key to lookup in this container key)Overrides org. Very similar to the standard Python __getitem__ method. |
| public PyObject | |
| public PyObject | |
| public PyDictionary | |
| protected final PyObject | |
| pack-priv final void | |
| pack-priv final PyObject | defaultdict___missing__(PyObject key)
This method does NOT call __setitem__ instead it relies on the fact that it is called within the context of `CacheLoader#load` to actually insert the value into the dict. |
| pack-priv final PyObject | |
| pack-priv final PyDefaultDict | |
| pack-priv final String | |
| public void | |
| public PyObject | get(PyObject
the key to lookup in the dictionary. key, PyObject the value to return if the key does not exists in the mapping. defaultObj)Overrides org. Return this[key] if the key exists in the mapping, defaultObj is returned otherwise. |
| public PyObject | |
| public ConcurrentMap | |
| public boolean | refersDirectlyTo(PyObject ob)
Overrides org. Implements org. Optional operation. |
| public void | |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| public int | traverse(Visitproc visit, Object arg)
Overrides org. Implements org. Traverses all directly contained |
| backingMap | back to summary |
|---|---|
| private final LoadingCache<PyObject, PyObject> backingMap | |
| defaultFactory | back to summary |
|---|---|
| private PyObject defaultFactory This attribute is used by the __missing__ method; it is initialized from the first argument to the constructor, if present, or to None, if absent. | |
| TYPE | back to summary |
|---|---|
| public static final PyType TYPE | |
| PyDefaultDict | back to summary |
|---|---|
| public PyDefaultDict() | |
| PyDefaultDict | back to summary |
|---|---|
| public PyDefaultDict(PyType subtype) | |
| PyDefaultDict | back to summary |
|---|---|
| public PyDefaultDict(PyType subtype, Map<PyObject, PyObject> map) | |
| __finditem__ | back to summary |
|---|---|
| public PyObject __finditem__(PyObject key) Overrides org. Doc from org. Very similar to the standard Python __getitem__ method. Instead of throwing a KeyError if the item isn't found, this just returns null. Classes that wish to implement __getitem__ should override this method instead (with the appropriate semantics. | |
| __missing__ | back to summary |
|---|---|
| public PyObject __missing__(PyObject key) | |
| __reduce__ | back to summary |
|---|---|
| public PyObject __reduce__() Overrides org. Doc from org. Used for pickling. Default implementation calls object___reduce__. | |
| copy | back to summary |
|---|---|
| public PyDictionary copy() Overrides org. Doc from org. Return a shallow copy of the dictionary.
| |
| defaultdict___getitem__ | back to summary |
|---|---|
protected final PyObject defaultdict___getitem__(PyObject key)
| |
| defaultdict___init__ | back to summary |
|---|---|
pack-priv final void defaultdict___init__(PyObject[] args, String[] kwds)
| |
| defaultdict___missing__ | back to summary |
|---|---|
| pack-priv final PyObject defaultdict___missing__(PyObject key) This method does NOT call __setitem__ instead it relies on the fact that it is called within the context of `CacheLoader#load` to actually insert the value into the dict.
| |
| defaultdict___reduce__ | back to summary |
|---|---|
pack-priv final PyObject defaultdict___reduce__()
| |
| defaultdict_copy | back to summary |
|---|---|
pack-priv final PyDefaultDict defaultdict_copy()
| |
| defaultdict_toString | back to summary |
|---|---|
pack-priv final String defaultdict_toString()
| |
| delDefaultFactory | back to summary |
|---|---|
public void delDefaultFactory()
| |
| get | back to summary |
|---|---|
| public PyObject get(PyObject key, PyObject defaultObj) Overrides org. Doc from org. Return this[key] if the key exists in the mapping, defaultObj is returned otherwise. | |
| getDefaultFactory | back to summary |
|---|---|
public PyObject getDefaultFactory()
| |
| getMap | back to summary |
|---|---|
| public ConcurrentMap Overrides org. | |
| refersDirectlyTo | back to summary |
|---|---|
| public boolean refersDirectlyTo(PyObject ob) Overrides org. Implements org. Doc from org. Optional operation.
Should only be implemented if it is more efficient
than calling
| |
| setDefaultFactory | back to summary |
|---|---|
public void setDefaultFactory(PyObject value)
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| traverse | back to summary |
|---|---|
| public int traverse(Visitproc visit, Object arg) Overrides org. Implements org. Doc from org. Traverses all directly contained
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final RuntimeException |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| thrownByMissing | back to summary |
|---|---|
| pack-priv final RuntimeException thrownByMissing | |
| MissingThrownException | back to summary |
|---|---|
| pack-priv MissingThrownException(RuntimeException thrownByMissing) | |