Interface WTList

All Superinterfaces:
Collection, Iterable, List, WTCollection
All Known Implementing Classes:
wt.fc.collections.AbstractWTList, WTArrayList

public interface WTList extends WTCollection, List
A WTCollection that implements the java.util.List interface.

Supported API: true

Extendable: false
  • Method Details

    • add

      void add(int index, Object o)
      Adds the given object at the given index. See WTCollection.add(Object) for further documentation

      Supported API: true
      Specified by:
      add in interface List
      Parameters:
      index -
      o -
    • add

      void add(int index, Persistable p)
      Adds the given object at the given index. See WTCollection.add(Object) for further documentation

      Supported API: true
      Parameters:
      index -
      p -
    • add

      void add(int index, QueryKey query_key)
      Adds the given object at the given index. See WTCollection.add(Object) for further documentation

      Supported API: true
      Parameters:
      index -
      query_key -
    • add

      void add(int index, WTReference ref)
      Adds the given object at the given index. See WTCollection.add(Object) for further documentation

      Supported API: true
      Parameters:
      index -
      ref -
    • addAll

      boolean addAll(int index, Collection c)
      Adds the given collection of objects at the given index. See WTCollection.add(Object) for further documentation

      Supported API: true
      Specified by:
      addAll in interface List
      Parameters:
      index -
      c -
      Returns:
      boolean
    • connect

      void connect(int index, Persistable p, WTCollection source)
      Connects the given object from the source collection to this collection, at the given index.

      Supported API: true
      Parameters:
      index -
      p -
      source -
      See Also:
    • connect

      void connect(int index, QueryKey query_key, WTCollection source)
      Connects the given object from the source collection to this collection, at the given index.

      Supported API: true
      Parameters:
      index -
      query_key -
      source -
      See Also:
    • connect

      void connect(int index, WTReference ref, WTCollection source)
      Connects the given object from the source collection to this collection, at the given index.

      Supported API: true
      Parameters:
      index -
      ref -
      source -
      See Also:
    • connectAll

      boolean connectAll(int index, WTCollection c)
      Connects the objects in the source collection to this collection, starting at the given index.

      Supported API: true
      Parameters:
      index -
      c -
      Returns:
      true If this operation modifies the collection
      See Also:
    • get

      Object get(int index)
      Gets the WTReference at the specified index.

      Supported API: true
      Specified by:
      get in interface List
      Parameters:
      index -
      Returns:
      A WTReference
    • getPersistable

      Persistable getPersistable(int index) throws WTException
      Gets the Persistable at the specified index. If the Persistable is not inflated, this method will go to the database to get it. Implementations may choose to have this cause an inflate of the entire list.

      Supported API: true
      Parameters:
      index -
      Returns:
      A Persistable
      Throws:
      WTException
    • getQueryKey

      QueryKey getQueryKey(int index)
      Gets the QueryKey at the specified index.

      Supported API: true
      Parameters:
      index -
      Returns:
      A QueryKey
    • getReference

      WTReference getReference(int index)
      Gets the WTReference at the specified index.

      Supported API: true
      Parameters:
      index -
      Returns:
      A WTReference
    • indexOf

      int indexOf(QueryKey query_key)
      Gets the index of the given object.

      Supported API: true
      Parameters:
      query_key -
      Returns:
      int
      See Also:
    • indexOf

      int indexOf(Persistable p)
      Gets the index of the given object.

      Supported API: true
      Parameters:
      p -
      Returns:
      int
      See Also:
    • indexOf

      int indexOf(WTReference ref)
      Gets the index of the given object.

      Supported API: true
      Parameters:
      ref -
      Returns:
      int
      See Also:
    • lastIndexOf

      int lastIndexOf(QueryKey query_key)
      Gets the last index of the given object.

      Supported API: true
      Parameters:
      query_key -
      Returns:
      int
      See Also:
    • lastIndexOf

      int lastIndexOf(Persistable p)
      Gets the last index of the given object.

      Supported API: true
      Parameters:
      p -
      Returns:
      int
      See Also:
    • lastIndexOf

      int lastIndexOf(WTReference ref)
      Gets the last index of the given object.

      Supported API: true
      Parameters:
      ref -
      Returns:
      int
      See Also:
    • listIterator

      ListIterator listIterator()
      Returns a ListIterator over the WTReferences in this list, per the contract of referenceListIterator().

      Supported API: true
      Specified by:
      listIterator in interface List
      Returns:
      A ListIterator of WTReferences
    • listIterator

      ListIterator listIterator(int index)
      Returns a ListIterator over the WTReferences in this list starting at the given index, per the contract of referenceListIterator(int).

      Supported API: true
      Specified by:
      listIterator in interface List
      Parameters:
      index -
      Returns:
      A ListIterator of WTReferences
    • persistableListIterator

      ListIterator persistableListIterator() throws WTException
      Returns a ListIterator over the Persistables in this list. Refreshes the collection in the same manner as WTCollection.persistableIterator().

      Supported API: true
      Returns:
      A ListIterator of Persistables
      Throws:
      WTException
    • persistableListIterator

      ListIterator persistableListIterator(int index) throws WTException
      Returns a ListIterator over the Persistables in this list, starting at the given index. Refreshes the collection in the same manner as WTCollection.persistableIterator().

      Supported API: true
      Parameters:
      index -
      Returns:
      A ListIterator of Persistables
      Throws:
      WTException
    • queryKeyListIterator

      ListIterator queryKeyListIterator()
      Returns a ListIterator over the QueryKeys in this list.

      Supported API: true
      Returns:
      A ListIterator of QueryKeys
    • queryKeyListIterator

      ListIterator queryKeyListIterator(int index)
      Returns a ListIterator over the QueryKeys in this list, starting at the given index.

      Supported API: true
      Parameters:
      index -
      Returns:
      A ListIterator of QueryKeys
    • referenceListIterator

      ListIterator referenceListIterator()
      Returns a ListIterator over the WTReferences in this list.

      Supported API: true
      Returns:
      A ListIterator of WTReferences
    • referenceListIterator

      ListIterator referenceListIterator(int index)
      Returns a ListIterator over the WTReferences in this list, starting at the given index.

      Supported API: true
      Parameters:
      index -
      Returns:
      A ListIterator of WTReferences
    • set

      Object set(int index, Object o)
      Assigns the object to the given index.

      Supported API: true
      Specified by:
      set in interface List
      Parameters:
      index -
      o -
      Returns:
      Object
      Throws:
      ClassCastException - per the constraints of WTCollection.add(Object)
    • set

      Persistable set(int index, Persistable p)
      Sets the object at the given index. See set(int, Object) for further documentation.

      Supported API: true
      Parameters:
      index -
      p -
      Returns:
      Persistable
    • set

      QueryKey set(int index, QueryKey query_key)
      Sets the object at the given index. See set(int, Object) for further documentation.

      Supported API: true
      Parameters:
      index -
      query_key -
      Returns:
      QueryKey
    • set

      WTReference set(int index, WTReference ref)
      Sets the object at the given index. See set(int, Object) for further documentation.

      Supported API: true
      Parameters:
      index -
      ref -
      Returns:
      WTReference
    • subList

      List subList(int from_index, int to_index)
      Returns a sublist of backed by this WTList, per the contract of List.subList(int,int)

      Supported API: true
      Specified by:
      subList in interface List
      Parameters:
      from_index -
      to_index -
      Returns:
      An implementation of WTList