Class List<E>

java.lang.Object
ch.ivyteam.ivy.scripting.objects.NestedObject
ch.ivyteam.ivy.scripting.objects.List<E>
Type Parameters:
E - The type of List-members.soap
All Implemented Interfaces:
IIvyDataObject, Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>

public final class List<E> extends NestedObject implements List<E>
A class for typed lists. A typed List knows its member type at runtime (for use in IvyScript). For use in Java-context, the class is generic.
Since:
March 2006
See Also:
API:
This is a public API.
  • Method Details

    • create

      public static List<Object> create()
      Creates a list for arbitrary IvyObjects.
      Returns:
      created list
      API:
      This public API is available in Java.
    • create

      public static <C> List<C> create(Class<C> javaClass)
      Creates a List with given Java-Member type.
      Type Parameters:
      C -
      Parameters:
      javaClass -
      Returns:
      created list
      API:
      This public API is available in Java.
    • create

      public static List<Object> create(int initCap)
      Creates a list for arbitrary IvyObjects.
      Parameters:
      initCap -
      Returns:
      created list
      API:
      This public API is available in Java.
    • create

      public static <C> List<C> create(Class<C> javaClass, int initCap)
      Creates a List with given Java-Member type.
      Type Parameters:
      C -
      Parameters:
      javaClass -
      initCap -
      Returns:
      created list
      API:
      This public API is available in Java.
    • add

      public boolean add(E element)
      Adds an element to the list.
      Parameters:
      element - The new element.
      Returns:
      Always return true.
      API:
      This public API is available in Java.
    • add

      public void add(int index, E element)
      Inserts a new element into the list.
      Parameters:
      index - Where to insert the new element.
      element - The new Element.
      API:
      This public API is available in Java.
    • addAll

      public boolean addAll(Collection<? extends E> elements)
      Adds all elements of a collection to this list.
      Parameters:
      elements - A collection with new elements; may be null.
      Returns:
      true if this list changed as a result of the call.
      API:
      This public API is available in Java.
    • addAll

      public boolean addAll(int index, Collection<? extends E> elements)
      Inserts all elemnts of some collection into this list.
      Parameters:
      index - Where to insert the new elements.
      elements - A collection with new elements.
      Returns:
      true if this list changed as a result of the call.
      API:
      This public API is available in Java.
    • set

      public E set(int index, E element)
      Sets the value of a list element.
      Parameters:
      index - The index of the element to set.
      element - The new value.
      Returns:
      The element previously at the specified position.
      API:
      This public API is available in Java.
    • elementChangedAt

      public void elementChangedAt(int index)
      Notifies all listeners that the element at given index has changed.
      Parameters:
      index -
      API:
      This public API is available in Java.
    • elementChanged

      public void elementChanged(Object object)
      Notifies all listeners that the given object has changed.
      Parameters:
      object -
      API:
      This public API is available in Java.
    • contains

      public boolean contains(Object o)
      See Also:
      API:
      This public API is available in Java.
    • containsAll

      public boolean containsAll(Collection<?> c)
      See Also:
      API:
      This public API is available in Java.
    • get

      public E get(int index)
      See Also:
      API:
      This public API is available in Java.
    • indexOf

      public int indexOf(Object o)
      See Also:
      API:
      This public API is available in Java.
    • isEmpty

      public boolean isEmpty()
      See Also:
      API:
      This public API is available in Java.
    • iterator

      public Iterator<E> iterator()
      See Also:
      API:
      This public API is available in Java.
    • lastIndexOf

      public int lastIndexOf(Object o)
      See Also:
      API:
      This public API is available in Java.
    • listIterator

      public ListIterator<E> listIterator()
      See Also:
      API:
      This public API is available in Java.
    • listIterator

      public ListIterator<E> listIterator(int index)
      See Also:
      API:
      This public API is available in Java.
    • remove

      public boolean remove(Object o)
      See Also:
      API:
      This public API is available in Java.
    • remove

      public E remove(int index)
      See Also:
      API:
      This public API is available in Java.
    • removeAll

      public boolean removeAll(Collection<?> c)
      See Also:
      API:
      This public API is available in Java.
    • retainAll

      public boolean retainAll(Collection<?> c)
      See Also:
      API:
      This public API is available in Java.
    • subList

      public List<E> subList(int fromIndex, int toIndex)
      See Also:
      API:
      This public API is available in Java.
    • toArray

      public E[] toArray()
      See Also:
      API:
      This public API is available in Java.
    • toArray

      public <T> T[] toArray(T[] a)
      Type Parameters:
      T - The type of the argument array
      Parameters:
      a -
      Returns:
      array with list contents
      API:
      This public API is available in Java.
    • clear

      public void clear()
      See Also:
      API:
      This public API is available in Java.
    • size

      public int size()
      See Also:
      API:
      This public API is available in Java.
    • ensureCapacity

      public void ensureCapacity(int cap)
      Sets the capacity of the list.
      Parameters:
      cap -
      API:
      This public API is available in Java.
    • clone

      public List<E> clone()
      Returns a shallow copy of this List.
      Specified by:
      clone in interface IIvyDataObject
      Overrides:
      clone in class NestedObject
      Returns:
      A clone
      See Also:
      API:
      This public API is available in Java.
    • deepClone

      public List<E> deepClone()
      Returns a deep copy of this List.
      Specified by:
      deepClone in interface IIvyDataObject
      Overrides:
      deepClone in class NestedObject
      Returns:
      A clone
      API:
      This public API is available in Java.
    • hashCode

      int hashCode(int level)
      Computes a hashcode considering elements up to a certain nesting depth.
      Parameters:
      level - The nesting depth.
      Returns:
      a HashCode
      API:
      This public API is available in Java.
    • trimToSize

      public void trimToSize()
      Trims the wrapped array.
      API:
      This public API is available in Java.