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=
"949.43">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.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
; color: #0021e7}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
}
14 span
.s1
{font: 18.0px Helvetica
}
15 span
.s2
{color: #000000}
16 span
.s3
{color: #002eaf}
17 span
.s4
{color: #002fe0}
18 span
.Apple-tab-span
{white-space:pre
}
22 <p class=
"p1"><span class=
"s1"><b>LinkedList
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>doubly linked list
</b></p>
23 <p class=
"p2"><br></p>
24 <p class=
"p3"><span class=
"s2"><b>Inherits from:
</b><a href=
"../Core/Object.html"><b>Object
</b></a><b> :
</b><a href=
"Collection.html"><b>Collection
</b></a></span><span class=
"s3"><b> :
</b></span><span class=
"s2"><b> </b><a href=
"SequenceableCollection.html"><b>SequenceableCollection
</b></a></span><span class=
"s4"><b><span class=
"Apple-converted-space"> </span></b></span></p>
25 <p class=
"p2"><br></p>
26 <p class=
"p1">LinkedList implements a doubly linked list.
</p>
27 <p class=
"p2"><br></p>
28 <p class=
"p4"><b>Instance Methods
</b></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p1">Most methods are inherited from the superclasses.
</p>
31 <p class=
"p2"><br></p>
32 <p class=
"p1"><b>addFirst(obj)
</b></p>
33 <p class=
"p2"><br></p>
34 <p class=
"p1">Add an item to the head of the list.
</p>
35 <p class=
"p2"><br></p>
36 <p class=
"p1"><b>add(obj)
</b></p>
37 <p class=
"p2"><br></p>
38 <p class=
"p1">Add an item to the tail of the list.
</p>
39 <p class=
"p2"><br></p>
40 <p class=
"p1"><b>remove(obj)
</b></p>
41 <p class=
"p2"><br></p>
42 <p class=
"p1">Remove an item from the list.
</p>
43 <p class=
"p2"><br></p>
44 <p class=
"p1"><b>pop
</b></p>
45 <p class=
"p2"><br></p>
46 <p class=
"p1">Remove and return the last item in the list.
</p>
47 <p class=
"p2"><br></p>
48 <p class=
"p1"><b>popFirst
</b></p>
49 <p class=
"p2"><br></p>
50 <p class=
"p1">Remove and return the first item in the list.
</p>
51 <p class=
"p2"><br></p>
52 <p class=
"p1"><b>first
</b></p>
53 <p class=
"p2"><br></p>
54 <p class=
"p1">Return the first item in the list.
</p>
55 <p class=
"p2"><br></p>
56 <p class=
"p1"><b>last
</b></p>
57 <p class=
"p2"><br></p>
58 <p class=
"p1">Return the last item in the list.
</p>
59 <p class=
"p2"><br></p>
60 <p class=
"p1"><b>at(index)
</b></p>
61 <p class=
"p2"><br></p>
62 <p class=
"p1">Return the item at the given index in the list.
<span class=
"Apple-converted-space"> </span></p>
63 <p class=
"p1">This requires a scan of the list and so is O(n).
</p>
64 <p class=
"p2"><br></p>
65 <p class=
"p1"><b>put(index, obj)
</b></p>
66 <p class=
"p2"><br></p>
67 <p class=
"p1">Put the item at the given index in the list.
<span class=
"Apple-converted-space"> </span></p>
68 <p class=
"p1">This requires a scan of the list and so is O(n).
</p>
69 <p class=
"p2"><br></p>
70 <p class=
"p1"><b>removeAt(index)
</b></p>
71 <p class=
"p2"><br></p>
72 <p class=
"p1">Remove and return the item at the given index in the list.
</p>
73 <p class=
"p1">This requires a scan of the list and so is O(n).
</p>