equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 "{ Package: 'stx:libbasic2' }" |
3 "{ Package: 'stx:libbasic2' }" |
2 |
4 |
3 "{ NameSpace: Smalltalk }" |
5 "{ NameSpace: Smalltalk }" |
4 |
6 |
5 Collection subclass:#VirtualDictionary |
7 Collection subclass:#VirtualDictionary |
28 " |
30 " |
29 ! ! |
31 ! ! |
30 |
32 |
31 !VirtualDictionary methodsFor:'accessing'! |
33 !VirtualDictionary methodsFor:'accessing'! |
32 |
34 |
|
35 at:aKey |
|
36 ^ self at:aKey ifAbsent:nil |
|
37 ! |
|
38 |
33 at:aKey ifAbsent:exceptionValue |
39 at:aKey ifAbsent:exceptionValue |
34 |value| |
40 |value| |
35 |
41 |
36 value := fetchBlock value:aKey. |
42 value := fetchBlock value:aKey. |
37 value isNil ifTrue:[ |
43 value isNil ifTrue:[ |
42 |
48 |
43 fetchBlock:something |
49 fetchBlock:something |
44 fetchBlock := something. |
50 fetchBlock := something. |
45 ! ! |
51 ! ! |
46 |
52 |
|
53 !VirtualDictionary methodsFor:'queries'! |
|
54 |
|
55 includesKey:aKey |
|
56 ^ (fetchBlock value:aKey) notNil |
|
57 ! ! |
|
58 |
47 !VirtualDictionary class methodsFor:'documentation'! |
59 !VirtualDictionary class methodsFor:'documentation'! |
48 |
60 |
49 version |
61 version |
50 ^ '$Header$' |
62 ^ '$Header$' |
51 ! |
63 ! |