List
Keywords: weiss.util.List interface

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weiss.util
Interface List<AnyType>

All Superinterfaces:
  Collection<AnyType>, java.lang.Iterable<AnyType>, java.io.Serializable

All Known Implementing Classes:
  ArrayList, LinkedList

    public interface List<AnyType>

extends Collection<AnyType>

List interface. The version in java.util places the union of sensible LinkedList and ArrayList methods in this interface. We place the useful intersection here instead, which is arguably empty.

Method Summary
`AnyType` | `get(int idx)` Returns the item at position idx.
`ListIterator<AnyType>` | `listIterator(int pos)` Obtains a ListIterator object used to traverse the collection bidirectionally.
`AnyType` | `set(int idx, AnyType newVal)` Changes the item at position idx.

Methods inherited from interface weiss.util.Collection
`add, clear, contains, isEmpty, iterator, remove, size, toArray, toArray`

Method Detail

### get

    AnyType get(int idx)

  Returns the item at position idx.

  Parameters:
    `idx` - the index to search in.
  Throws:
    `java.lang.IndexOutOfBoundsException` - if index is out of range.

### set

    AnyType set(int idx,
                AnyType newVal)

  Changes the item at position idx.

  Parameters:
    `idx` - the index to change.
    `newVal` - the new value.
  Returns:
    the old value.
  Throws:
    `java.lang.IndexOutOfBoundsException` - if index is out of range.

### listIterator

    ListIterator<AnyType> listIterator(int pos)

  Obtains a ListIterator object used to traverse the collection bidirectionally.

  Parameters:
    `pos` - the index to start the iterator. Use size() to do complete reverse traversal. Use 0 to do complete forward traversal.
  Returns:
    an iterator positioned prior to the requested element.
  Throws:
    `java.lang.IndexOutOfBoundsException` - if idx is not between 0 and size(), inclusive.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD