org.python.core

Class PySequenceList

Implemented Interfaces:
List, java.io.Serializable
Known Direct Subclasses:
PyList, PyTuple

public abstract class PySequenceList
extends PySequence
implements List

Author:
updikca1 To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments
See Also:
Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.python.core.PyObject

PyObject.ConversionException

Field Summary

Fields inherited from class org.python.core.PyObject

exposed_name

Constructor Summary

PySequenceList()
This constructor is used by PyJavaClass.init()
PySequenceList(PyObject[] elements)
Creates an instance directly backed by the array of PyObject elements.
PySequenceList(PyType type, Collection c)

Method Summary

boolean
add(Object o)
void
add(int index, Object element)
boolean
addAll(Collection c)
boolean
addAll(int index, Collection c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection c)
boolean
equals(Object o)
Should almost never be overridden.
Object
get(int index)
PyObject[]
getArray()
Get the backing array.
int
hashCode()
int
indexOf(Object o)
boolean
isEmpty()
Iterator
iterator()
int
lastIndexOf(Object o)
ListIterator
listIterator()
ListIterator
listIterator(int index)
void
pyadd(int index, PyObject element)
boolean
pyadd(PyObject o)
PyObject
pyget(int index)
PyObject
pyset(int index, PyObject element)
boolean
remove(Object o)
Object
remove(int index)
void
remove(int start, int stop)
boolean
removeAll(Collection c)
boolean
retainAll(Collection c)
Object
set(int index, Object element)
int
size()
List
subList(int fromIndex, int toIndex)
Object[]
toArray()
Object[]
toArray(Object[] a)
String
toString()

Methods inherited from class org.python.core.PySequence

__delitem__, __delslice__, __eq__, __finditem__, __finditem__, __ge__, __getitem__, __getslice__, __gt__, __iter__, __le__, __lt__, __ne__, __nonzero__, __setitem__, __setitem__, __setslice__, __tojava__, isMappingType, isNumberType

Methods inherited from class org.python.core.PyObject

__abs__, __add__, __and__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __call__, __cmp__, __coerce__, __coerce_ex__, __complex__, __contains__, __delattr__, __delattr__, __delete__, __delitem__, __delitem__, __delslice__, __delslice__, __dir__, __div__, __divmod__, __eq__, __findattr__, __findattr__, __finditem__, __finditem__, __finditem__, __float__, __floordiv__, __ge__, __get__, __getattr__, __getattr__, __getitem__, __getitem__, __getnewargs__, __getslice__, __getslice__, __gt__, __hash__, __hex__, __iadd__, __iand__, __idiv__, __idivmod__, __ifloordiv__, __ilshift__, __imod__, __imul__, __int__, __invert__, __ior__, __ipow__, __irshift__, __isub__, __iter__, __iternext__, __itruediv__, __ixor__, __le__, __len__, __long__, __lshift__, __lt__, __mod__, __mul__, __ne__, __neg__, __nonzero__, __not__, __oct__, __or__, __pos__, __pow__, __pow__, __radd__, __rand__, __rdiv__, __rdivmod__, __reduce__, __repr__, __rfloordiv__, __rlshift__, __rmod__, __rmul__, __ror__, __rpow__, __rrshift__, __rshift__, __rsub__, __rtruediv__, __rxor__, __set__, __setattr__, __setattr__, __setitem__, __setitem__, __setitem__, __setslice__, __setslice__, __str__, __sub__, __tojava__, __truediv__, __unicode__, __xor__, _add, _and, _callextra, _cmp, _div, _divmod, _doget, _doget, _doset, _eq, _floordiv, _ge, _gt, _in, _is, _isnot, _jcall, _jcallexc, _jthrow, _le, _lshift, _lt, _mod, _mul, _ne, _notin, _or, _pow, _rshift, _sub, _truediv, _xor, asInt, asLong, asName, asString, asStringOrNull, delDict, delType, dispatch__init__, equals, fastGetClass, fastGetDict, getDict, getDoc, getType, hashCode, implementsDescrDelete, implementsDescrSet, invoke, invoke, invoke, invoke, invoke, isCallable, isDataDescr, isMappingType, isNumberType, isSequenceType, noAttributeError, readonlyAttributeError, safeRepr, setDict, setType, toString, typeSetup

Constructor Details

PySequenceList

public PySequenceList()
This constructor is used by PyJavaClass.init()

PySequenceList

public PySequenceList(PyObject[] elements)
Creates an instance directly backed by the array of PyObject elements.
Parameters:
elements -

PySequenceList

public PySequenceList(PyType type,
                      Collection c)

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)

clear

public void clear()

contains

public boolean contains(Object o)

containsAll

public boolean containsAll(Collection c)

equals

public boolean equals(Object o)
Should almost never be overridden. If overridden, it is the subclasses responsibility to ensure that a.equals(b) == true iff cmp(a,b) == 0
Overrides:
equals in interface PyObject

get

public Object get(int index)

getArray

public PyObject[] getArray()
Get the backing array. The array should not be modified. To get a copy of the array, see toArray().
Returns:
backing array object

hashCode

public int hashCode()
Overrides:
hashCode in interface PyObject

indexOf

public int indexOf(Object o)

isEmpty

public boolean isEmpty()

iterator

public Iterator iterator()

lastIndexOf

public int lastIndexOf(Object o)

listIterator

public ListIterator listIterator()

listIterator

public ListIterator listIterator(int index)

pyadd

public void pyadd(int index,
                  PyObject element)

pyadd

public boolean pyadd(PyObject o)

pyget

public PyObject pyget(int index)
Parameters:
index - index of element to return.
Returns:
the element at the given position in the list.

pyset

public PyObject pyset(int index,
                      PyObject element)

remove

public boolean remove(Object o)

remove

public Object remove(int index)

remove

public void remove(int start,
                   int stop)

removeAll

public boolean removeAll(Collection c)

retainAll

public boolean retainAll(Collection c)

set

public Object set(int index,
                  Object element)

size

public int size()

subList

public List subList(int fromIndex,
                    int toIndex)

toArray

public Object[] toArray()

toArray

public Object[] toArray(Object[] a)

toString

public String toString()
Overrides:
toString in interface PyObject

Jython homepage