## org.python.core
Class PyObjectList

    java.lang.Object
      java.util.AbstractCollection
          java.util.AbstractList
              org.python.core.PyObjectList

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List

    public class PyObjectList

extends java.util.AbstractList
implements java.lang.Cloneable, java.io.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:

- pyadd(int, PyObject)
- pyadd(PyObject)
- pyset(PyObject)
- pyget()

Author:
  Clark Updike
See Also:
  Serialized Form

Constructor Summary
`PyObjectList()`
`PyObjectList(java.util.Collection c)`
`PyObjectList(int size)`
`PyObjectList(PyObject[] pyObjArr)`

Method Summary
`void` `add(int index, java.lang.Object element)` For internal jython usage, use `pyadd(int, PyObject)`.
`boolean` `add(java.lang.Object o)` For internal jython usage, use `pyadd(PyObject)`.
`boolean` `addAll(java.util.Collection c)`
`boolean` `addAll(int index, java.util.Collection c)`
`java.lang.Object` `clone()`
`boolean` `equals(java.lang.Object o)`
`java.lang.Object` `get(int index)` Use `pyget(int)` for internal jython usage.
`int` `hashCode()`
`void` `pyadd(int index, PyObject element)`
`boolean` `pyadd(PyObject o)`
`java.lang.Object` `remove(int index)`
`void` `remove(int start, int stop)`
`java.lang.Object` `set(int index, java.lang.Object element)` Use `pyset(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 class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.List
`contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray`

Constructor Detail

### PyObjectList

    public PyObjectList()

### PyObjectList

    public PyObjectList(PyObject[] pyObjArr)

### PyObjectList

    public PyObjectList(java.util.Collection c)

### PyObjectList

    public PyObjectList(int size)

Method Detail

### add

    public void add(int index,
                    java.lang.Object element)

  For internal jython usage, use `pyadd(int, PyObject)`.

  Specified by:
    `add` in interface `java.util.List`
  Overrides:
    `add` in class `java.util.AbstractList`

### pyadd

    public void pyadd(int index,
                      PyObject element)

### add

    public boolean add(java.lang.Object o)

  For internal jython usage, use `pyadd(PyObject)`.

  Specified by:
    `add` in interface `java.util.Collection`
  Specified by:
    `add` in interface `java.util.List`
  Overrides:
    `add` in class `java.util.AbstractList`

### pyadd

    public boolean pyadd(PyObject o)

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Specified by:
    `equals` in interface `java.util.Collection`
  Specified by:
    `equals` in interface `java.util.List`
  Overrides:
    `equals` in class `java.util.AbstractList`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `java.util.Collection`
  Specified by:
    `hashCode` in interface `java.util.List`
  Overrides:
    `hashCode` in class `java.util.AbstractList`

### get

    public java.lang.Object get(int index)

  Use `pyget(int)` for internal jython usage.

  Specified by:
    `get` in interface `java.util.List`
  Specified by:
    `get` in class `java.util.AbstractList`

### remove

    public java.lang.Object remove(int index)

  Specified by:
    `remove` in interface `java.util.List`
  Overrides:
    `remove` in class `java.util.AbstractList`

### remove

    public void remove(int start,
                       int stop)

### set

    public java.lang.Object set(int index,
                                java.lang.Object element)

  Use `pyset(int, PyObject)` for internal jython usage.

  Specified by:
    `set` in interface `java.util.List`
  Overrides:
    `set` in class `java.util.AbstractList`

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Collection`
  Specified by:
    `size` in interface `java.util.List`
  Specified by:
    `size` in class `java.util.AbstractCollection`

### addAll

    public boolean addAll(java.util.Collection c)

  Specified by:
    `addAll` in interface `java.util.Collection`
  Specified by:
    `addAll` in interface `java.util.List`
  Overrides:
    `addAll` in class `java.util.AbstractCollection`

### addAll

    public boolean addAll(int index,
                          java.util.Collection c)

  Specified by:
    `addAll` in interface `java.util.List`
  Overrides:
    `addAll` in class `java.util.AbstractList`

Jython homepage