Package org.python.core
Class PyObjectList
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
org.python.core.PyObjectList
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable
,Collection
,List
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:
- pyadd(int, PyObject)
- pyadd(PyObject)
- pyset(PyObject)
- pyget()
- Author:
- Clark Updike
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
For internal jython usage, usepyadd(int, PyObject)
.boolean
For internal jython usage, usepyadd(PyObject)
.boolean
addAll
(int index, Collection c) boolean
addAll
(Collection c) clone()
boolean
get
(int index) Usepyget(int)
for internal jython usage.int
hashCode()
void
boolean
remove
(int index) void
remove
(int start, int stop) Usepyset(int, PyObject)
for internal jython usage.int
size()
Methods inherited from class java.util.AbstractList
clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
PyObjectList
public PyObjectList() -
PyObjectList
-
PyObjectList
-
PyObjectList
public PyObjectList(int size)
-
-
Method Details
-
add
For internal jython usage, usepyadd(int, PyObject)
.- Specified by:
add
in interfaceList
- Overrides:
add
in classAbstractList
-
pyadd
-
add
For internal jython usage, usepyadd(PyObject)
.- Specified by:
add
in interfaceCollection
- Specified by:
add
in interfaceList
- Overrides:
add
in classAbstractList
-
pyadd
-
clone
-
equals
- Specified by:
equals
in interfaceCollection
- Specified by:
equals
in interfaceList
- Overrides:
equals
in classAbstractList
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection
- Specified by:
hashCode
in interfaceList
- Overrides:
hashCode
in classAbstractList
-
get
Usepyget(int)
for internal jython usage.- Specified by:
get
in interfaceList
- Specified by:
get
in classAbstractList
-
remove
- Specified by:
remove
in interfaceList
- Overrides:
remove
in classAbstractList
-
remove
public void remove(int start, int stop) -
set
Usepyset(int, PyObject)
for internal jython usage.- Specified by:
set
in interfaceList
- Overrides:
set
in classAbstractList
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in interfaceList
- Specified by:
size
in classAbstractCollection
-
addAll
- Specified by:
addAll
in interfaceCollection
- Specified by:
addAll
in interfaceList
- Overrides:
addAll
in classAbstractCollection
-
addAll
- Specified by:
addAll
in interfaceList
- Overrides:
addAll
in classAbstractList
-