1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"824.42">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
; min-height: 16.0px}
16 span
.s1
{text-decoration: underline
}
20 <p class=
"p1"><b>SortedList
</b></p>
21 <p class=
"p2"><br></p>
22 <p class=
"p3"><b>Superclass: List
</b></p>
23 <p class=
"p2"><br></p>
24 <p class=
"p3">SortedList is a Collection whose items are kept in a sorted order.
</p>
25 <p class=
"p2"><br></p>
26 <p class=
"p4"><b><span class=
"s1">Creation
</span></b></p>
27 <p class=
"p2"><br></p>
28 <p class=
"p3"><b>*new(size, function)
</b></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p3">Creates a SortedList with the initial capacity given by
<b>size
</b> and a comparison
<b>function
</b>.
</p>
31 <p class=
"p2"><br></p>
32 <p class=
"p4"><b><span class=
"s1">Instance Methods
</span></b></p>
33 <p class=
"p2"><br></p>
34 <p class=
"p3"><b>add(item)
</b></p>
35 <p class=
"p2"><br></p>
36 <p class=
"p3">Adds an item in the SortedList at the correct position.
</p>
37 <p class=
"p2"><br></p>
38 <p class=
"p5">SortedList[
1,
2,
5,
6].add(
4).postln;
</p>
39 <p class=
"p2"><br></p>
40 <p class=
"p2"><br></p>
41 <p class=
"p3"><b>addAll(aCollection)
</b></p>
42 <p class=
"p2"><br></p>
43 <p class=
"p3">Adds all the items in the collection into the SortedList.
</p>
44 <p class=
"p2"><br></p>
45 <p class=
"p5">SortedList[
1,
2,
5,
6].addAll([
0,
3,
4,
7]).postln;
</p>
46 <p class=
"p6"><br></p>