PyListWrapper (Java-Python Bridge 0.10.0-SNAPSHOT Java API)
Date: 2022-06-06

org.jpy

## Class PyListWrapper

- java.lang.Object
- - org.jpy.PyListWrapper

- All Implemented Interfaces:
    Iterable<PyObject>, Collection<PyObject>, List<PyObject>

      public class PyListWrapper
      extends Object
      implements List<PyObject>

  A simple wrapper around a Python List object that implements a java List of PyObjects.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(int index, PyObject element)`
    `boolean` | `add(PyObject pyObject)`
    `boolean` | `addAll(Collection<? extends PyObject> c)`
    `boolean` | `addAll(int index, Collection<? extends PyObject> c)`
    `void` | `clear()`
    `boolean` | `contains(Object o)`
    `boolean` | `containsAll(Collection<?> c)`
    `PyObject` | `get(int index)`
    `int` | `indexOf(Object o)`
    `boolean` | `isEmpty()`
    `Iterator<PyObject>` | `iterator()`
    `int` | `lastIndexOf(Object o)`
    `ListIterator<PyObject>` | `listIterator()`
    `ListIterator<PyObject>` | `listIterator(int index)`
    `PyObject` | `remove(int index)`
    `boolean` | `remove(Object o)`
    `boolean` | `removeAll(Collection<?> c)`
    `boolean` | `retainAll(Collection<?> c)`
    `PyObject` | `set(int index, PyObject element)`
    `void` | `setItem(int index, PyObject element)`
    `int` | `size()`
    `List<PyObject>` | `subList(int fromIndex, int toIndex)`
    `PyObject[]` | `toArray()`
    `<T> T[]` | `toArray(T[] a)`
    `String` | `toString(int prefixLength)` Return a summarized preview of this list.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.List

      `equals, hashCode, replaceAll, sort, spliterator`

    - ### Methods inherited from interface java.util.Collection

      `parallelStream, removeIf, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Method Detail

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<PyObject>`
      Specified by:
        `size` in interface `List<PyObject>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `Collection<PyObject>`
      Specified by:
        `isEmpty` in interface `List<PyObject>`

    - #### contains

          public boolean contains(Object o)

      Specified by:
        `contains` in interface `Collection<PyObject>`
      Specified by:
        `contains` in interface `List<PyObject>`

    - #### iterator

          public Iterator<PyObject> iterator()

      Specified by:
        `iterator` in interface `Iterable<PyObject>`
      Specified by:
        `iterator` in interface `Collection<PyObject>`
      Specified by:
        `iterator` in interface `List<PyObject>`

    - #### toArray

          public PyObject[] toArray()

      Specified by:
        `toArray` in interface `Collection<PyObject>`
      Specified by:
        `toArray` in interface `List<PyObject>`

    - #### toArray

          public <T> T[] toArray(T[] a)

      Specified by:
        `toArray` in interface `Collection<PyObject>`
      Specified by:
        `toArray` in interface `List<PyObject>`

    - #### add

          public boolean add(PyObject pyObject)

      Specified by:
        `add` in interface `Collection<PyObject>`
      Specified by:
        `add` in interface `List<PyObject>`

    - #### remove

          public boolean remove(Object o)

      Specified by:
        `remove` in interface `Collection<PyObject>`
      Specified by:
        `remove` in interface `List<PyObject>`

    - #### containsAll

          public boolean containsAll(Collection<?> c)

      Specified by:
        `containsAll` in interface `Collection<PyObject>`
      Specified by:
        `containsAll` in interface `List<PyObject>`

    - #### addAll

          public boolean addAll(Collection<? extends PyObject> c)

      Specified by:
        `addAll` in interface `Collection<PyObject>`
      Specified by:
        `addAll` in interface `List<PyObject>`

    - #### addAll

          public boolean addAll(int index,
                                Collection<? extends PyObject> c)

      Specified by:
        `addAll` in interface `List<PyObject>`

    - #### removeAll

          public boolean removeAll(Collection<?> c)

      Specified by:
        `removeAll` in interface `Collection<PyObject>`
      Specified by:
        `removeAll` in interface `List<PyObject>`

    - #### retainAll

          public boolean retainAll(Collection<?> c)

      Specified by:
        `retainAll` in interface `Collection<PyObject>`
      Specified by:
        `retainAll` in interface `List<PyObject>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Collection<PyObject>`
      Specified by:
        `clear` in interface `List<PyObject>`

    - #### get

          public PyObject get(int index)

      Specified by:
        `get` in interface `List<PyObject>`

    - #### set

          public PyObject set(int index,
                              PyObject element)

      Specified by:
        `set` in interface `List<PyObject>`

    - #### setItem

          public void setItem(int index,
                              PyObject element)

    - #### add

          public void add(int index,
                          PyObject element)

      Specified by:
        `add` in interface `List<PyObject>`

    - #### remove

          public PyObject remove(int index)

      Specified by:
        `remove` in interface `List<PyObject>`

    - #### indexOf

          public int indexOf(Object o)

      Specified by:
        `indexOf` in interface `List<PyObject>`

    - #### lastIndexOf

          public int lastIndexOf(Object o)

      Specified by:
        `lastIndexOf` in interface `List<PyObject>`

    - #### listIterator

          public ListIterator<PyObject> listIterator()

      Specified by:
        `listIterator` in interface `List<PyObject>`

    - #### listIterator

          public ListIterator<PyObject> listIterator(int index)

      Specified by:
        `listIterator` in interface `List<PyObject>`

    - #### subList

          public List<PyObject> subList(int fromIndex,
                                        int toIndex)

      Specified by:
        `subList` in interface `List<PyObject>`

    - #### toString

          public String toString(int prefixLength)

      Return a summarized preview of this list.
      Parameters:
        `prefixLength` - The maximum prefix of the array to convert
      Returns:
        The String representation of array

Copyright © 2014–2022 Brockmann Consult GmbH. All rights reserved.