|
Sydney | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--AbstractList | +--ArrayList
Defined in array_list.js
Field Summary | |
var |
_length
|
Fields inherited from class AbstractList |
|
Constructor Summary | |
ArrayList
()
Creates a list that's based on an array. |
Method Summary | |
void
|
clear()
Empties the list. |
void
|
sort(<Function> comparator)
Destructively sorts the list. |
Methods inherited from class AbstractList |
append, contains, copy, getHead, getIndexOf, getItemAfter, getItemAt, getItemBefore, getLength, getTail, insertAfter, insertBefore, insertItemAt, isEmpty, iterator, join, prepend, remove, removeAll, removeHead, removeTail, removeItemAt, replace, reverseIterator, selectRangeInto, toArray, toString
|
Field Detail |
var _length
Constructor Detail |
function ArrayList()
Method Detail |
void clear()
clear()
, the list is
empty—list.getHead()
, list.getTail()
will both return null
and list.getLength()
will return 0
.
void sort(<Function> comparator)
comparator
- a function taking two arguments and returning an integer: comparator
is null
or not provided then the elements of the list are sorted lexicographically according to their value after being converted to a string.
|
Sydney | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |