HelpBrowser: path box becomes a more conventional search box
[supercollider.git] / SCClassLibrary / Common / Collections / Association.sc
blob6273a52579009e54d5b256f931166349e78190fa
1 Association : Magnitude {
2         var <>key, <>value;
4         *new { arg key, value;
5                 ^super.newCopyArgs(key, value)
6         }
8         == { arg anAssociation;
9                 ^anAssociation respondsTo: \key and: { key == anAssociation.key }
10         }
12         hash {
13                 ^key.hash
14         }
16         < { arg anAssociation;
17                 ^key < anAssociation.key
18         }
20         printOn { arg stream;
21                 stream << "(" << key << " -> " << value << ")";
22         }
23         storeOn { arg stream;
24                 stream << "(" <<< key << " -> " <<< value << ")";
25         }
27         // Pattern support
28         embedInStream { arg inval;
29                 ^inval.add(this).yield;
30         }
31         transformEvent { arg event;
32                 ^event.add(this);
33         }