|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.python.core.PyObject org.python.core.PySequence
The abstract superclass of PyObjects that implements a Sequence. Minimize the work in creating such objects. Method names are designed to make it possible for PySequence to implement java.util.List interface when JDK 1.2 is ubiquitous. All subclasses must declare that they implement the ClassDictInit interface, and provide an classDictInit() method that calls PySequence.classDictInit(). Subclasses must also implement get, getslice, and repeat methods. Subclasses that are mutable should also implement: set, setslice, del, and delRange.
Field Summary | |
String |
annotation
|
Fields inherited from class org.python.core.PyObject |
__class__ |
Constructor Summary | |
PySequence()
This constructor is used by PyJavaClass.init() |
|
PySequence(PyClass c)
This constructor is used to pass on an __class__ attribute. |
Method Summary | |
PyObject |
__and__(PyObject o)
Equivalent to the standard Python __and__ method |
PyObject |
__anye__(PyObject po)
|
PyObject |
__bde__(PyObject object)
|
void |
__delitem__(PyObject index)
Equivalent to the standard Python __delitem__ method. |
void |
__delslice__(PyObject s_start,
PyObject s_stop,
PyObject s_step)
|
PyObject |
__eq__(PyObject o)
Equivalent to the standard Python __eq__ method. |
PyObject |
__findattr__(String name)
A variant of the __findattr__ method which accepts a Java String as the name. |
PyObject |
__finditem__(int index)
A variant of the __finditem__ method which accepts a primitive int as the key. |
PyObject |
__finditem__(PyObject index)
Very similar to the standard Python __getitem__ method. |
PyObject |
__ge__(PyObject o)
Equivalent to the standard Python __ge__ method. |
PyObject |
__getitem__(PyObject index)
Equivalent to the standard Python __getitem__ method. |
PyObject |
__getslice__(PyObject s_start,
PyObject s_stop,
PyObject s_step)
|
PyObject |
__gt__(PyObject o)
Equivalent to the standard Python __gt__ method. |
PyObject |
__lde__(PyObject object)
|
PyObject |
__le__(PyObject o)
Equivalent to the standard Python __le__ method. |
PyObject |
__lt__(PyObject o)
Equivalent to the standard Python __lt__ method. |
PyObject |
__ne__(PyObject o)
Equivalent to the standard Python __ne__ method. |
boolean |
__nonzero__()
Equivalent to the standard Python __nonzero__ method. |
PyObject |
__or__(PyObject o)
Equivalent to the standard Python __or__ method |
PyObject |
__rde__(PyObject object)
|
void |
__setattr__(String name,
PyObject value)
A variant of the __setattr__ method which accepts a String as the key. |
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. |
void |
__setslice__(PyObject s_start,
PyObject s_stop,
PyObject s_step,
PyObject value)
|
PyObject |
__sub__(PyObject object)
Equivalent to the standard Python __sub__ method |
Object |
__tojava__(Class c)
Equivalent to the Jython __tojava__ method. |
static void |
classDictInit(PyObject dict)
Internal use only. |
boolean |
containsGraphElements()
|
Collection |
findEdges()
|
void |
findEdges(PySequence seq,
Collection s)
|
Collection |
findGraphElements()
|
void |
findGraphElements(PySequence seq,
Collection c)
|
Collection |
findNodes()
|
void |
findNodes(PySequence seq,
Collection s)
|
void |
findNodesAndEdges(Collection n,
Collection e)
|
void |
findNodesAndEdges(PySequence seq,
Collection n,
Collection e)
|
String |
getAnnotation()
|
Collection |
groupAndSortBy(Field f)
|
Collection |
groupBy(Field f)
|
void |
hide()
|
boolean |
isMappingType()
|
boolean |
isNumberType()
|
void |
show()
|
int |
size()
|
Collection |
sortBy(Field f)
|
PySequence |
unroll()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public String annotation
Constructor Detail |
public PySequence()
public PySequence(PyClass c)
Method Detail |
public String getAnnotation()
public int size()
public static void classDictInit(PyObject dict)
public boolean __nonzero__()
PyObject
PyObject
is
considered true.
__nonzero__
in class PyObject
public PyObject __eq__(PyObject o)
PyObject
__eq__
in class PyObject
o
- the object to compare this with.
public PyObject __ne__(PyObject o)
PyObject
__ne__
in class PyObject
o
- the object to compare this with.
public PyObject __lt__(PyObject o)
PyObject
__lt__
in class PyObject
o
- the object to compare this with.
public PyObject __le__(PyObject o)
PyObject
__le__
in class PyObject
o
- the object to compare this with.
public PyObject __gt__(PyObject o)
PyObject
__gt__
in class PyObject
o
- the object to compare this with.
public PyObject __ge__(PyObject o)
PyObject
__ge__
in class PyObject
o
- the object to compare this with.
public PyObject __and__(PyObject o)
PyObject
__and__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __or__(PyObject o)
PyObject
__or__
in class PyObject
o
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __finditem__(int index)
PyObject
int
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 PyObject
index
- the key to lookup in this sequence.
PyObject.__finditem__(PyObject)
public PyObject __finditem__(PyObject index)
PyObject
__finditem__
in class PyObject
index
- the key to lookup in this container
public PyObject __getitem__(PyObject index)
PyObject
__finditem__
method instead.
__getitem__
in class PyObject
index
- the key to lookup in this container.
PyObject.__finditem__(PyObject)
public boolean isMappingType()
isMappingType
in class PyObject
public boolean isNumberType()
isNumberType
in class PyObject
public PyObject __getslice__(PyObject s_start, PyObject s_stop, PyObject s_step)
__getslice__
in class PyObject
public void __setslice__(PyObject s_start, PyObject s_stop, PyObject s_step, PyObject value)
__setslice__
in class PyObject
public void __delslice__(PyObject s_start, PyObject s_stop, PyObject s_step)
__delslice__
in class PyObject
public void __setitem__(int index, PyObject value)
PyObject
int
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 PyObject
index
- 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 PyObject
index
- the key whose value will be setvalue
- the value to set this key topublic void __delitem__(PyObject index)
PyObject
__delitem__
in class PyObject
index
- the key to be removed from the containerpublic Object __tojava__(Class c)
PyObject
Py.NoConversion
if this PyObject
can not be converted to the
desired Java class.
__tojava__
in class PyObject
c
- the Class to convert this PyObject
to.public PyObject __findattr__(String name)
PyObject
String
as the name.
By default, this method will call __findattr__(PyString
name)
with the appropriate args. The only reason to override
this method is for performance.
Warning: name must be an interned string!!!!!!!!
__findattr__
in class PyObject
name
- the name to lookup in this namespace
must be an interned string .
PyObject.__findattr__(PyString)
public PySequence unroll()
public void __setattr__(String name, PyObject value)
PyObject
__setattr__
in class PyObject
name
- the name whose value will be set -
must be an interned string .value
- the value to set this name toPyObject.__setattr__(PyString, PyObject)
public void show()
public void hide()
public PyObject __sub__(PyObject object)
PyObject
__sub__
in class PyObject
object
- the object to perform this binary operation with
(the right-hand operand).
public PyObject __rde__(PyObject object)
__rde__
in class PyObject
object
- the object to compare this with.
public PyObject __lde__(PyObject object)
__lde__
in class PyObject
object
- the object to compare this with.
public PyObject __bde__(PyObject object)
__bde__
in class PyObject
object
- the object to compare this with.
public PyObject __anye__(PyObject po)
__anye__
in class PyObject
po
- the object to compare this with.
public Collection groupBy(Field f)
public Collection groupAndSortBy(Field f)
public Collection sortBy(Field f)
public Collection findNodes()
public void findNodes(PySequence seq, Collection s)
public Collection findEdges()
public void findEdges(PySequence seq, Collection s)
public void findNodesAndEdges(Collection n, Collection e)
public void findNodesAndEdges(PySequence seq, Collection n, Collection e)
public boolean containsGraphElements()
public Collection findGraphElements()
public void findGraphElements(PySequence seq, Collection c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |