25 lines
549 B
Text
25 lines
549 B
Text
|
CLASS::SortedList
|
||
|
summary::a Collection whose items are kept in a sorted order.
|
||
|
categories::Collections>Ordered
|
||
|
|
||
|
CLASSMETHODS::
|
||
|
|
||
|
method::new
|
||
|
Creates a SortedList with the initial capacity given by strong::size:: and a comparison strong::function::.
|
||
|
|
||
|
INSTANCEMETHODS::
|
||
|
|
||
|
private::indexForInserting
|
||
|
|
||
|
method::add
|
||
|
Adds an item in the SortedList at the correct position.
|
||
|
code::
|
||
|
SortedList[1, 2, 5, 6].add(4).postln;
|
||
|
::
|
||
|
|
||
|
method::addAll
|
||
|
Adds all the items in the collection into the SortedList.
|
||
|
code::
|
||
|
SortedList[1, 2, 5, 6].addAll([0, 3, 4, 7]).postln;
|
||
|
::
|