equal
deleted
inserted
replaced
19 |
19 |
20 LinkedList comment:' |
20 LinkedList comment:' |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libbasic/LinkedList.st,v 1.9 1994-10-10 00:26:30 claus Exp $ |
24 $Header: /cvs/stx/stx/libbasic/LinkedList.st,v 1.10 1994-10-28 01:24:45 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !LinkedList class methodsFor:'documentation'! |
27 !LinkedList class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libbasic/LinkedList.st,v 1.9 1994-10-10 00:26:30 claus Exp $ |
45 $Header: /cvs/stx/stx/libbasic/LinkedList.st,v 1.10 1994-10-28 01:24:45 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
234 ^ link |
234 ^ link |
235 ! |
235 ! |
236 |
236 |
237 remove:aLink ifAbsent:exceptionBlock |
237 remove:aLink ifAbsent:exceptionBlock |
238 "remove the argument, aLink from the sequence; if absent, |
238 "remove the argument, aLink from the sequence; if absent, |
239 evaluate the excpetionBlock" |
239 evaluate the exceptionBlock" |
240 |
240 |
241 |prevNode nextNode thisNode| |
241 |prevNode nextNode thisNode| |
242 |
242 |
243 thisNode := firstLink. |
243 thisNode := firstLink. |
244 [thisNode notNil] whileTrue:[ |
244 [thisNode notNil] whileTrue:[ |
256 lastLink := thisNode nextLink |
256 lastLink := thisNode nextLink |
257 ] |
257 ] |
258 ]. |
258 ]. |
259 numberOfNodes := numberOfNodes - 1. |
259 numberOfNodes := numberOfNodes - 1. |
260 thisNode nextLink:nil. |
260 thisNode nextLink:nil. |
261 ^ self |
261 ^ aLink |
262 ]. |
262 ]. |
263 prevNode := thisNode. |
263 prevNode := thisNode. |
264 thisNode := nextNode |
264 thisNode := nextNode |
265 ]. |
265 ]. |
266 ^ exceptionBlock value |
266 ^ exceptionBlock value |