|
Sydney | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--AbstractList | +--EmptyList
Defined in empty_list.js
Fields inherited from class AbstractList |
|
Constructor Summary | |
EmptyList
(<boolean> silentRemove, <boolean> silentAdd)
Creates a list that is always empty. |
Methods inherited from class AbstractList |
append, clear, contains, copy, getHead, getIndexOf, getItemAfter, getItemAt, getItemBefore, getLength, getTail, insertAfter, insertBefore, insertItemAt, isEmpty, iterator, join, prepend, remove, removeAll, removeHead, removeTail, removeItemAt, replace, reverseIterator, selectRangeInto, sort, toArray, toString
|
Constructor Detail |
function EmptyList(<boolean> silentRemove, <boolean> silentAdd)
EmptyList
always fail. According to constructor
parameters, these failures can either be silent, or they can raise an
exception. The default behaviour is for both sets of operations to raise an
exception with the rationale being that if a list is supposed to remain
empty, then it is probably an error if that list is passed to a context
where items are added to it or removed from it. Note that some
AbstractList
methods that are implemented in terms of
inserting and removing elements may not trigger any exceptions if their
implementation determines that no such calls are necessary. (For example,
clearing an empty list is essentially a no-op, so calling clear on an
instance of EmptyList
that is supposed to raise an exception on
remove attempts may not raise any exceptions if the implementation of
clear
short-circuits on empty lists.)
silentRemove
- (Optional) - if true
, attempts to remove items from the list will fail silently, if false
, such attempts will throw an exception. Defaults to false
.
silentAdd
- (Optional) - if true
, attempts to insert items in the list will fail silently, if false
, such attemps will throw an exception. Defaults to false
.
|
Sydney | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |