| java.lang.Object org.python.core.PyObject org.python.core.PyDictionary
All known Subclasses: org.python.core.PyDictionaryDerived,
PyDictionary | public class PyDictionary extends PyObject (Code) | | A builtin python dictionary.
|
Constructor Summary | |
public | PyDictionary() Create an empty dictionary. | public | PyDictionary(PyType subtype) | public | PyDictionary(Hashtable t) Create an new dictionary which is based on the hashtable.
Parameters: t - the hashtable used. | public | PyDictionary(PyObject elements) Create a new dictionary with the element as content.
Parameters: elements - The initial elements that is inserted in thedictionary. |
Method Summary | |
public int | __cmp__(PyObject ob_other) | public void | __delitem__(PyObject key) | public PyObject | __eq__(PyObject ob_other) | public PyObject | __finditem__(int index) | public PyObject | __finditem__(PyObject key) | public PyObject | __iter__() | public int | __len__() | public PyObject | __ne__(PyObject ob_other) | public boolean | __nonzero__() | public void | __setitem__(PyObject key, PyObject value) | public void | clear() Remove all items from the dictionary. | public PyDictionary | copy() Return a shallow copy of the dictionary. | final int | dict___cmp__(PyObject ob_other) | final boolean | dict___contains__(PyObject o) | final void | dict___delitem__(PyObject key) | final PyObject | dict___eq__(PyObject ob_other) | final PyObject | dict___finditem__(PyObject key) | final PyObject | dict___ge__(PyObject ob_other) | final PyObject | dict___gt__(PyObject ob_other) | final PyObject | dict___iter__() | final PyObject | dict___le__(PyObject ob_other) | final int | dict___len__() | final PyObject | dict___lt__(PyObject ob_other) | final PyObject | dict___ne__(PyObject ob_other) | final boolean | dict___nonzero__() | final void | dict___setitem__(PyObject key, PyObject value) | final void | dict_clear() | final PyDictionary | dict_copy() | final static PyObject | dict_fromkeys(PyType type, PyObject keys) | final static PyObject | dict_fromkeys(PyType type, PyObject keys, PyObject value) | final PyObject | dict_get(PyObject key, PyObject default_object) | final PyObject | dict_get(PyObject key) | final boolean | dict_has_key(PyObject key) | final int | dict_hashCode() | final void | dict_init(PyObject[] args, String[] kwds) | final PyList | dict_items() | final PyObject | dict_iteritems() | final PyObject | dict_iterkeys() | final PyObject | dict_itervalues() | final PyList | dict_keys() | final PyObject | dict_pop(PyObject key) | final PyObject | dict_pop(PyObject key, PyObject defaultValue) | final PyObject | dict_popitem() | final PyObject | dict_setdefault(PyObject key) | final PyObject | dict_setdefault(PyObject key, PyObject failobj) | final String | dict_toString() | final void | dict_update(PyObject d) | final PyList | dict_values() | public static PyObject | fromkeys(PyObject keys) | public static PyObject | fromkeys(PyObject keys, PyObject value) | public PyObject | get(PyObject key, PyObject default_object) Return this[key] if the key exists in the mapping, default_object
is returned otherwise. | public PyObject | get(PyObject key) Return this[key] if the key exists in the mapping, None
is returned otherwise. | public boolean | has_key(PyObject key) Return true if the key exist in the dictionary. | public int | hashCode() | public boolean | isSequenceType() | public PyList | items() Return a copy of the dictionarys list of (key, value) tuple
pairs. | public PyObject | iteritems() Return an interator over (key, value) pairs. | public PyObject | iterkeys() Return an interator over (key, value) pairs. | public PyObject | itervalues() Return an interator over (key, value) pairs. | public PyList | keys() Return a copy of the dictionarys list of keys. | public PyObject | pop(PyObject key) Return a value based on key
from the dictionary. | public PyObject | pop(PyObject key, PyObject defaultValue) Return a value based on key
from the dictionary or default if that key is not found. | public PyObject | popitem() Return a random (key, value) tuple pair and remove the pair
from the dictionary. | public PyObject | setdefault(PyObject key) Return this[key] if the key exist, otherwise insert key with
a None value and return None. | public PyObject | setdefault(PyObject key, PyObject failobj) | public String | toString() | public static void | typeSetup(PyObject dict, PyType.Newstyle marker) | public void | update(PyObject d) Insert all the key:value pairs from d into
this dictionary. | public PyList | values() Return a copy of the dictionarys list of values. |
PyDictionary | public PyDictionary()(Code) | | Create an empty dictionary.
|
PyDictionary | public PyDictionary(PyType subtype)(Code) | | For derived types
Parameters: subtype - |
PyDictionary | public PyDictionary(Hashtable t)(Code) | | Create an new dictionary which is based on the hashtable.
Parameters: t - the hashtable used. The supplied hashtable is used asis and must only contain PyObject key:value pairs. |
PyDictionary | public PyDictionary(PyObject elements)(Code) | | Create a new dictionary with the element as content.
Parameters: elements - The initial elements that is inserted in thedictionary. Even numbered elements are keys,odd numbered elements are values. |
__len__ | public int __len__()(Code) | | |
__nonzero__ | public boolean __nonzero__()(Code) | | |
clear | public void clear()(Code) | | Remove all items from the dictionary.
|
dict___len__ | final int dict___len__()(Code) | | |
dict___nonzero__ | final boolean dict___nonzero__()(Code) | | |
dict_clear | final void dict_clear()(Code) | | |
dict_hashCode | final int dict_hashCode()(Code) | | |
get | public PyObject get(PyObject key, PyObject default_object)(Code) | | Return this[key] if the key exists in the mapping, default_object
is returned otherwise.
Parameters: key - the key to lookup in the dictionary. Parameters: default_object - the value to return if the key does notexists in the mapping. |
get | public PyObject get(PyObject key)(Code) | | Return this[key] if the key exists in the mapping, None
is returned otherwise.
Parameters: key - the key to lookup in the dictionary. |
has_key | public boolean has_key(PyObject key)(Code) | | Return true if the key exist in the dictionary.
|
hashCode | public int hashCode()(Code) | | |
isSequenceType | public boolean isSequenceType()(Code) | | |
items | public PyList items()(Code) | | Return a copy of the dictionarys list of (key, value) tuple
pairs.
|
iteritems | public PyObject iteritems()(Code) | | Return an interator over (key, value) pairs.
|
iterkeys | public PyObject iterkeys()(Code) | | Return an interator over (key, value) pairs.
|
itervalues | public PyObject itervalues()(Code) | | Return an interator over (key, value) pairs.
|
keys | public PyList keys()(Code) | | Return a copy of the dictionarys list of keys.
|
pop | public PyObject pop(PyObject key, PyObject defaultValue)(Code) | | Return a value based on key
from the dictionary or default if that key is not found.
|
popitem | public PyObject popitem()(Code) | | Return a random (key, value) tuple pair and remove the pair
from the dictionary.
|
setdefault | public PyObject setdefault(PyObject key)(Code) | | Return this[key] if the key exist, otherwise insert key with
a None value and return None.
Parameters: key - the key to lookup in the dictionary. |
setdefault | public PyObject setdefault(PyObject key, PyObject failobj)(Code) | | Return this[key] if the key exist, otherwise insert key with
the value of failobj and return failobj
Parameters: key - the key to lookup in the dictionary. Parameters: failobj - the default value to insert in the dictionaryif key does not already exist. |
update | public void update(PyObject d)(Code) | | Insert all the key:value pairs from d into
this dictionary.
|
values | public PyList values()(Code) | | Return a copy of the dictionarys list of values.
|
Methods inherited from org.python.core.PyObject | public PyObject __abs__()(Code)(Java Doc) public PyObject __add__(PyObject other)(Code)(Java Doc) public PyObject __and__(PyObject other)(Code)(Java Doc) public PyObject __call__(PyObject args, String keywords)(Code)(Java Doc) public PyObject __call__(PyObject arg1, PyObject args, String keywords)(Code)(Java Doc) public PyObject __call__(PyObject args)(Code)(Java Doc) public PyObject __call__()(Code)(Java Doc) public PyObject __call__(PyObject arg0)(Code)(Java Doc) public PyObject __call__(PyObject arg0, PyObject arg1)(Code)(Java Doc) public PyObject __call__(PyObject arg0, PyObject arg1, PyObject arg2)(Code)(Java Doc) public PyObject __call__(PyObject arg0, PyObject arg1, PyObject arg2, PyObject arg3)(Code)(Java Doc) public int __cmp__(PyObject other)(Code)(Java Doc) final public PyObject __coerce__(PyObject pyo)(Code)(Java Doc) public Object __coerce_ex__(PyObject o)(Code)(Java Doc) public PyComplex __complex__()(Code)(Java Doc) public boolean __contains__(PyObject o)(Code)(Java Doc) final public void __delattr__(PyString name)(Code)(Java Doc) public void __delattr__(String name)(Code)(Java Doc) public void __delete__(PyObject obj)(Code)(Java Doc) public void __delitem__(PyObject key)(Code)(Java Doc) public void __delitem__(String key)(Code)(Java Doc) public void __delslice__(PyObject s_start, PyObject s_stop, PyObject s_step)(Code)(Java Doc) public void __delslice__(PyObject start, PyObject stop)(Code)(Java Doc) public PyObject __dir__()(Code)(Java Doc) public PyObject __div__(PyObject other)(Code)(Java Doc) public PyObject __divmod__(PyObject other)(Code)(Java Doc) public PyObject __eq__(PyObject other)(Code)(Java Doc) final public PyObject __findattr__(PyString name)(Code)(Java Doc) public PyObject __findattr__(String name)(Code)(Java Doc) public PyObject __finditem__(PyObject key)(Code)(Java Doc) public PyObject __finditem__(int key)(Code)(Java Doc) public PyObject __finditem__(String key)(Code)(Java Doc) public PyFloat __float__()(Code)(Java Doc) public PyObject __floordiv__(PyObject other)(Code)(Java Doc) public PyObject __ge__(PyObject other)(Code)(Java Doc) public PyObject __get__(PyObject obj, PyObject type)(Code)(Java Doc) final public PyObject __getattr__(PyString name)(Code)(Java Doc) final public PyObject __getattr__(String name)(Code)(Java Doc) public PyObject __getitem__(int key)(Code)(Java Doc) public PyObject __getitem__(PyObject key)(Code)(Java Doc) public PyTuple __getnewargs__()(Code)(Java Doc) public PyObject __getslice__(PyObject s_start, PyObject s_stop, PyObject s_step)(Code)(Java Doc) public PyObject __getslice__(PyObject start, PyObject stop)(Code)(Java Doc) public PyObject __gt__(PyObject other)(Code)(Java Doc) final public PyInteger __hash__()(Code)(Java Doc) public PyString __hex__()(Code)(Java Doc) public PyObject __iadd__(PyObject other)(Code)(Java Doc) public PyObject __iand__(PyObject other)(Code)(Java Doc) public PyObject __idiv__(PyObject other)(Code)(Java Doc) public PyObject __idivmod__(PyObject other)(Code)(Java Doc) public PyObject __ifloordiv__(PyObject other)(Code)(Java Doc) public PyObject __ilshift__(PyObject other)(Code)(Java Doc) public PyObject __imod__(PyObject other)(Code)(Java Doc) public PyObject __imul__(PyObject other)(Code)(Java Doc) public PyObject __int__()(Code)(Java Doc) public PyObject __invert__()(Code)(Java Doc) public PyObject __ior__(PyObject other)(Code)(Java Doc) public PyObject __ipow__(PyObject other)(Code)(Java Doc) public PyObject __irshift__(PyObject other)(Code)(Java Doc) public PyObject __isub__(PyObject other)(Code)(Java Doc) public PyObject __iter__()(Code)(Java Doc) public PyObject __iternext__()(Code)(Java Doc) public PyObject __itruediv__(PyObject other)(Code)(Java Doc) public PyObject __ixor__(PyObject other)(Code)(Java Doc) public PyObject __le__(PyObject other)(Code)(Java Doc) public int __len__()(Code)(Java Doc) public PyLong __long__()(Code)(Java Doc) public PyObject __lshift__(PyObject other)(Code)(Java Doc) public PyObject __lt__(PyObject other)(Code)(Java Doc) public PyObject __mod__(PyObject other)(Code)(Java Doc) public PyObject __mul__(PyObject other)(Code)(Java Doc) public PyObject __ne__(PyObject other)(Code)(Java Doc) public PyObject __neg__()(Code)(Java Doc) public boolean __nonzero__()(Code)(Java Doc) public PyObject __not__()(Code)(Java Doc) public PyString __oct__()(Code)(Java Doc) public PyObject __or__(PyObject other)(Code)(Java Doc) public PyObject __pos__()(Code)(Java Doc) public PyObject __pow__(PyObject o2, PyObject o3)(Code)(Java Doc) public PyObject __pow__(PyObject other)(Code)(Java Doc) public PyObject __radd__(PyObject other)(Code)(Java Doc) public PyObject __rand__(PyObject other)(Code)(Java Doc) protected void __rawdir__(PyDictionary accum)(Code)(Java Doc) public PyObject __rdiv__(PyObject other)(Code)(Java Doc) public PyObject __rdivmod__(PyObject other)(Code)(Java Doc) public PyObject __reduce__()(Code)(Java Doc) public PyString __repr__()(Code)(Java Doc) public PyObject __rfloordiv__(PyObject other)(Code)(Java Doc) public PyObject __rlshift__(PyObject other)(Code)(Java Doc) public PyObject __rmod__(PyObject other)(Code)(Java Doc) public PyObject __rmul__(PyObject other)(Code)(Java Doc) public PyObject __ror__(PyObject other)(Code)(Java Doc) public PyObject __rpow__(PyObject other)(Code)(Java Doc) public PyObject __rrshift__(PyObject other)(Code)(Java Doc) public PyObject __rshift__(PyObject other)(Code)(Java Doc) public PyObject __rsub__(PyObject other)(Code)(Java Doc) public PyObject __rtruediv__(PyObject other)(Code)(Java Doc) public PyObject __rxor__(PyObject other)(Code)(Java Doc) public void __set__(PyObject obj, PyObject value)(Code)(Java Doc) final public void __setattr__(PyString name, PyObject value)(Code)(Java Doc) public void __setattr__(String name, PyObject value)(Code)(Java Doc) public void __setitem__(PyObject key, PyObject value)(Code)(Java Doc) public void __setitem__(String key, PyObject value)(Code)(Java Doc) public void __setitem__(int key, PyObject value)(Code)(Java Doc) public void __setslice__(PyObject s_start, PyObject s_stop, PyObject s_step, PyObject value)(Code)(Java Doc) public void __setslice__(PyObject start, PyObject stop, PyObject value)(Code)(Java Doc) public PyString __str__()(Code)(Java Doc) public PyObject __sub__(PyObject other)(Code)(Java Doc) public Object __tojava__(Class c)(Code)(Java Doc) public PyObject __truediv__(PyObject other)(Code)(Java Doc) public PyUnicode __unicode__()(Code)(Java Doc) public PyObject __xor__(PyObject other)(Code)(Java Doc) final public PyObject _add(PyObject o2)(Code)(Java Doc) final public PyObject _and(PyObject o2)(Code)(Java Doc) final PyObject _basic_add(PyObject o2)(Code)(Java Doc) final PyObject _basic_and(PyObject o2)(Code)(Java Doc) final PyObject _basic_div(PyObject o2)(Code)(Java Doc) final PyObject _basic_divmod(PyObject o2)(Code)(Java Doc) final PyObject _basic_floordiv(PyObject o2)(Code)(Java Doc) final PyObject _basic_lshift(PyObject o2)(Code)(Java Doc) final PyObject _basic_mod(PyObject o2)(Code)(Java Doc) final PyObject _basic_mul(PyObject o2)(Code)(Java Doc) final PyObject _basic_or(PyObject o2)(Code)(Java Doc) final PyObject _basic_pow(PyObject o2)(Code)(Java Doc) final PyObject _basic_rshift(PyObject o2)(Code)(Java Doc) final PyObject _basic_sub(PyObject o2)(Code)(Java Doc) final PyObject _basic_truediv(PyObject o2)(Code)(Java Doc) final PyObject _basic_xor(PyObject o2)(Code)(Java Doc) public PyObject _callextra(PyObject[] args, String[] keywords, PyObject starargs, PyObject kwargs)(Code)(Java Doc) final public int _cmp(PyObject o)(Code)(Java Doc) PyObject[] _coerce(PyObject other)(Code)(Java Doc) final public PyObject _div(PyObject o2)(Code)(Java Doc) final public PyObject _divmod(PyObject o2)(Code)(Java Doc) public PyObject _doget(PyObject container)(Code)(Java Doc) public PyObject _doget(PyObject container, PyObject wherefound)(Code)(Java Doc) public boolean _doset(PyObject container, PyObject value)(Code)(Java Doc) final public PyObject _eq(PyObject o)(Code)(Java Doc) final public PyObject _floordiv(PyObject o2)(Code)(Java Doc) final public PyObject _ge(PyObject o)(Code)(Java Doc) final public PyObject _gt(PyObject o)(Code)(Java Doc) final public PyObject _in(PyObject o)(Code)(Java Doc) public PyObject _is(PyObject o)(Code)(Java Doc) public PyObject _isnot(PyObject o)(Code)(Java Doc) public PyObject _jcall(Object[] args)(Code)(Java Doc) public PyObject _jcallexc(Object[] args) throws Throwable(Code)(Java Doc) public void _jthrow(Throwable t)(Code)(Java Doc) final public PyObject _le(PyObject o)(Code)(Java Doc) final public PyObject _lshift(PyObject o2)(Code)(Java Doc) final public PyObject _lt(PyObject o)(Code)(Java Doc) final public PyObject _mod(PyObject o2)(Code)(Java Doc) final public PyObject _mul(PyObject o2)(Code)(Java Doc) final public PyObject _ne(PyObject o)(Code)(Java Doc) final public PyObject _notin(PyObject o)(Code)(Java Doc) final public PyObject _or(PyObject o2)(Code)(Java Doc) final public PyObject _pow(PyObject o2)(Code)(Java Doc) final public PyObject _rshift(PyObject o2)(Code)(Java Doc) final public PyObject _sub(PyObject o2)(Code)(Java Doc) final public PyObject _truediv(PyObject o2)(Code)(Java Doc) final protected String _unsupportedop(String op, PyObject o2)(Code)(Java Doc) final public PyObject _xor(PyObject o2)(Code)(Java Doc) protected void addKeys(PyDictionary accum, String attr)(Code)(Java Doc) public int asInt(int index) throws ConversionException(Code)(Java Doc) public long asLong(int index) throws ConversionException(Code)(Java Doc) public String asName(int index) throws ConversionException(Code)(Java Doc) public String asString(int index) throws ConversionException(Code)(Java Doc) public String asStringOrNull(int index) throws ConversionException(Code)(Java Doc) public void delDict()(Code)(Java Doc) public void delType()(Code)(Java Doc) public void dispatch__init__(PyType type, PyObject[] args, String[] keywords)(Code)(Java Doc) public boolean equals(Object ob_other)(Code)(Java Doc) public PyObject fastGetClass()(Code)(Java Doc) public PyObject fastGetDict()(Code)(Java Doc) public PyObject getDict()(Code)(Java Doc) public PyObject getDoc()(Code)(Java Doc) public PyType getType()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) protected PyObject impAttr(String name)(Code)(Java Doc) public boolean implementsDescrDelete()(Code)(Java Doc) public boolean implementsDescrSet()(Code)(Java Doc) public PyObject invoke(String name, PyObject[] args, String[] keywords)(Code)(Java Doc) public PyObject invoke(String name, PyObject[] args)(Code)(Java Doc) public PyObject invoke(String name)(Code)(Java Doc) public PyObject invoke(String name, PyObject arg1)(Code)(Java Doc) public PyObject invoke(String name, PyObject arg1, PyObject arg2)(Code)(Java Doc) public boolean isCallable()(Code)(Java Doc) public boolean isDataDescr()(Code)(Java Doc) public boolean isMappingType()(Code)(Java Doc) public boolean isNumberType()(Code)(Java Doc) public boolean isSequenceType()(Code)(Java Doc) boolean jdontdel()(Code)(Java Doc) boolean jtryset(PyObject container, PyObject value)(Code)(Java Doc) public void noAttributeError(String name)(Code)(Java Doc) final boolean object___contains__(PyObject o)(Code)(Java Doc) final void object___delattr__(String name)(Code)(Java Doc) final PyObject object___findattr__(String name)(Code)(Java Doc) final PyObject object___reduce__()(Code)(Java Doc) final void object___setattr__(String name, PyObject value)(Code)(Java Doc) final int object_hashCode()(Code)(Java Doc) final void object_init(PyObject[] args, String[] keywords)(Code)(Java Doc) final String object_toString()(Code)(Java Doc) public void readonlyAttributeError(String name)(Code)(Java Doc) protected String runsupportedopMessage(String op, PyObject o2)(Code)(Java Doc) public String safeRepr() throws PyIgnoreMethodTag(Code)(Java Doc) public void setDict(PyObject newDict)(Code)(Java Doc) public void setType(PyType type)(Code)(Java Doc) public String toString()(Code)(Java Doc) public static void typeSetup(PyObject dict, PyType.Newstyle marker)(Code)(Java Doc) protected String unsupportedopMessage(String op, PyObject o2)(Code)(Java Doc)
|
|
|