org.python.core

Class PyObjectList

Implemented Interfaces:
Cloneable, Serializable

public class PyObjectList
extends AbstractList
implements Cloneable, Serializable

java.util.List implementation using an underlying PyObject array for higher performance. Jython should use the following methods where possible, instead of their List counterparts:
Author:
Clark Updike

Constructor Summary

PyObjectList()
PyObjectList(Collection c)
PyObjectList(int size)
PyObjectList(PyObject[] pyObjArr)

Method Summary

boolean
add(Object o)
For internal jython usage, use pyadd(PyObject).
void
add(int index, Object element)
For internal jython usage, use pyadd(int,PyObject).
boolean
addAll(Collection c)
boolean
addAll(int index, Collection c)
Object
clone()
boolean
equals(Object o)
Object
get(int index)
Use pyget(int) for internal jython usage.
int
hashCode()
void
pyadd(int index, PyObject element)
boolean
pyadd(PyObject o)
Object
remove(int index)
void
remove(int start, int stop)
Object
set(int index, Object element)
Use pyset(int, PyObject) for internal jython usage.
int
size()

Constructor Details

PyObjectList

public PyObjectList()

PyObjectList

public PyObjectList(Collection c)

PyObjectList

public PyObjectList(int size)

PyObjectList

public PyObjectList(PyObject[] pyObjArr)

Method Details

add

public boolean add(Object o)

add

public void add(int index,
                Object element)

addAll

public boolean addAll(Collection c)

addAll

public boolean addAll(int index,
                      Collection c)

clone

public Object clone()

equals

public boolean equals(Object o)

get

public Object get(int index)
Use pyget(int) for internal jython usage.

hashCode

public int hashCode()

pyadd

public void pyadd(int index,
                  PyObject element)

pyadd

public boolean pyadd(PyObject o)

remove

public Object remove(int index)

remove

public void remove(int start,
                   int stop)

set

public Object set(int index,
                  Object element)
Use pyset(int, PyObject) for internal jython usage.

size

public int size()

Jython homepage