Sydney

Class AbstractList

Object
   |
   +--AbstractList
Direct Known Subclasses:
WidgetList, ArrayList, EmptyList, LinkedList

class AbstractList

Defined in abstract_list.js


Constructor Summary
AbstractList ()
            An abstract base class for lists.
 
Method Summary
 void append(<Object> item)
           Appends the given item to the end of the list.
 void clear()
           Empties the list.
 boolean contains(<Object> item)
           Searches the list for item and returns true if it is found.
 void copy(<Object> source, <boolean> keepOldItems)
           Copies the contents of the source into this list.
 Object getHead()
           Returns the item at the head of the list.
 int getIndexOf(<Object> item)
           Returns the index of item in this list.
 Object getItemAfter(<Object> item)
           Retrieves the item after item in this list.
 Object getItemAt(<int> index)
           Returns the item in the list whose index is index.
 Object getItemBefore(<Object> item)
           Retrieves the item before item in this list.
 int getLength()
           Returns the length of the list.
 Object getTail()
           Returns the item at the tail of the list.
 void insertAfter(<Object> newItem, <Object> oldItem)
           Inserts newItem after oldItem.
 void insertBefore(<Object> newItem, <Object> oldItem)
           Inserts newItem before oldItem.
 void insertItemAt(<Object> item, <int> index)
           Inserts item at index index.
 boolean isEmpty()
           Returns true if and only if the list is empty.
 Iterator iterator()
           Returns an iterator on this list.
 string join(<string> separator)
           Joins the elements of the list into a string, separated by separator.
 void prepend(<Object> item)
           Inserts item into this list before the head.
 Object remove(<Object> item)
           Removes item from this list and returns it.
 void removeAll(<AbstractList> list)
           Removes all elements from this list that are also in list.
 Object removeHead()
           Removes the head of this list and returns it.
 Object removeItemAt(<int> index)
           Removes and returns the item at the given index.
 Object removeTail()
           Removes the tail of this list and returns it.
 Object replace(<Object> newItem, <Object> oldItem)
           Replaces oldItem with newItem in this list.
 Iterator reverseIterator()
           Returns a reverse iterator on this list.
 AbstractList selectRangeInto(<Object> startObj, <Object> endObj, <AbstractList> list)
           Selects all elements of this list between startObj and endObj inclusive and copies them into list.
 void sort(<Function> comparator)
           Destructively sorts the list.
 Array toArray()
           Returns an array containing the same items as this list, in the same order.
 string toString()
           Returns a string representation of this list.

Constructor Detail

AbstractList

function AbstractList()
Method Detail

append

void append(<Object> item)

clear

void clear()

contains

boolean contains(<Object> item)

copy

void copy(<Object> source, <boolean> keepOldItems)

getHead

Object getHead()

getIndexOf

int getIndexOf(<Object> item)

getItemAfter

Object getItemAfter(<Object> item)

getItemAt

Object getItemAt(<int> index)

getItemBefore

Object getItemBefore(<Object> item)

getLength

int getLength()

getTail

Object getTail()

insertAfter

void insertAfter(<Object> newItem, <Object> oldItem)

insertBefore

void insertBefore(<Object> newItem, <Object> oldItem)

insertItemAt

void insertItemAt(<Object> item, <int> index)

isEmpty

boolean isEmpty()

iterator

Iterator iterator()

join

string join(<string> separator)

prepend

void prepend(<Object> item)

remove

Object remove(<Object> item)

removeAll

void removeAll(<AbstractList> list)

removeHead

Object removeHead()

removeItemAt

Object removeItemAt(<int> index)

removeTail

Object removeTail()

replace

Object replace(<Object> newItem, <Object> oldItem)

reverseIterator

Iterator reverseIterator()

selectRangeInto

AbstractList selectRangeInto(<Object> startObj, <Object> endObj, <AbstractList> list)

sort

void sort(<Function> comparator)

toArray

Array toArray()

toString

string toString()

Sydney

SourceForge.net Logo