|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.python.core.PyObject
org.python.modules.jffi.CData
org.python.modules.jffi.ArrayCData
public class ArrayCData
| Nested Class Summary | |
|---|---|
class |
ArrayCData.ArrayIter
|
| Nested classes/interfaces inherited from class org.python.core.PyObject |
|---|
PyObject.ConversionException |
| Field Summary | |
|---|---|
static PyType |
TYPE
|
| Method Summary | |
|---|---|
void |
__delitem__(PyObject key)
Equivalent to the standard Python __delitem__ method. |
PyObject |
__finditem__(int index)
A variant of the __finditem__ method which accepts a primitive int as the key. |
PyObject |
__getitem__(PyObject index)
Equivalent to the standard Python __getitem__ method. |
PyObject |
__iter__()
Return an iterator that is used to iterate the element of this sequence. |
void |
__setitem__(int index,
PyObject value)
A variant of the __setitem__ method which accepts a primitive int as the key. |
void |
__setitem__(PyObject index,
PyObject value)
Equivalent to the standard Python __setitem__ method. |
static PyObject |
ArrayCData_new(PyNewWrapper new_,
boolean init,
PyType subtype,
PyObject[] args,
String[] keywords)
|
static PyObject |
from_address(PyType subtype,
PyObject address)
|
DirectMemory |
getMemory()
|
| Methods inherited from class org.python.modules.jffi.CData |
|---|
address, byref, getContentMemory, getReferenceMemory, pointer |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PyType TYPE
| Method Detail |
|---|
public static PyObject ArrayCData_new(PyNewWrapper new_,
boolean init,
PyType subtype,
PyObject[] args,
String[] keywords)
public static final PyObject from_address(PyType subtype,
PyObject address)
public final DirectMemory getMemory()
getMemory in interface Pointerpublic PyObject __finditem__(int index)
PyObjectint as the key. By default, this method will call
__finditem__(PyObject key) with the appropriate args.
The only reason to override this method is for performance.
__finditem__ in class PyObjectindex - the key to lookup in this sequence.
PyObject.__finditem__(PyObject)public PyObject __getitem__(PyObject index)
PyObject__finditem__ method instead.
__getitem__ in class PyObjectindex - the key to lookup in this container.
PyObject.__finditem__(PyObject)
public void __setitem__(int index,
PyObject value)
PyObjectint as the key.
By default, this will call
__setitem__(PyObject key, PyObject value)
with the appropriate args.
The only reason to override this method is for performance.
__setitem__ in class PyObjectindex - the key whose value will be setvalue - the value to set this key toPyObject.__setitem__(PyObject, PyObject)
public void __setitem__(PyObject index,
PyObject value)
PyObject
__setitem__ in class PyObjectindex - the key whose value will be setvalue - the value to set this key topublic void __delitem__(PyObject key)
PyObject
__delitem__ in class PyObjectkey - the key to be removed from the containerpublic PyObject __iter__()
PyObjectIf a PyObject subclass should support iteration based in the __finditem__() method, it must supply an implementation of __iter__() like this:
public PyObject __iter__() {
return new PySequenceIter(this);
}
When iterating over a python sequence from java code, it should be done with code like this:
for (PyObject item : seq.asIterable()) {
// Do somting with item
}
__iter__ in class PyObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||