smalltalk.addPackage('Kernel-Collections', {}); smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel-Collections'); smalltalk.addMethod( unescape('_size'), smalltalk.method({ selector: unescape('size'), category: 'accessing', fn: function (){ var self=this; smalltalk.send(self, "_subclassResponsibility", []); return self;}, args: [], source: unescape('size%0A%09self%20subclassResponsibility'), messageSends: ["subclassResponsibility"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_readStream'), smalltalk.method({ selector: unescape('readStream'), category: 'accessing', fn: function (){ var self=this; return smalltalk.send(self, "_stream", []); return self;}, args: [], source: unescape('readStream%0A%09%5Eself%20stream'), messageSends: ["stream"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_writeStream'), smalltalk.method({ selector: unescape('writeStream'), category: 'accessing', fn: function (){ var self=this; return smalltalk.send(self, "_stream", []); return self;}, args: [], source: unescape('writeStream%0A%09%5Eself%20stream'), messageSends: ["stream"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_stream'), smalltalk.method({ selector: unescape('stream'), category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]); return self;}, args: [], source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'), messageSends: ["on:", "streamClass"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_streamClass'), smalltalk.method({ selector: unescape('streamClass'), category: 'accessing', fn: function (){ var self=this; return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []); return self;}, args: [], source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'), messageSends: ["streamClass", "class"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_add_'), smalltalk.method({ selector: unescape('add%3A'), category: 'adding/removing', fn: function (anObject){ var self=this; smalltalk.send(self, "_subclassResponsibility", []); return self;}, args: ["anObject"], source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'), messageSends: ["subclassResponsibility"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_addAll_'), smalltalk.method({ selector: unescape('addAll%3A'), category: 'adding/removing', fn: function (aCollection){ var self=this; smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]); return aCollection; return self;}, args: ["aCollection"], source: unescape('addAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20add%3A%20each%5D.%0A%09%5EaCollection'), messageSends: ["do:", "add:"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('__comma'), smalltalk.method({ selector: unescape('%2C'), category: 'copying', fn: function (aCollection){ var self=this; return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", [])); return self;}, args: ["aCollection"], source: unescape('%2C%20aCollection%0A%09%5Eself%20copy%20%0A%09%20%20%20%20addAll%3A%20aCollection%3B%20%0A%09%20%20%20%20yourself'), messageSends: ["addAll:", "yourself", "copy"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_copyWith_'), smalltalk.method({ selector: unescape('copyWith%3A'), category: 'copying', fn: function (anObject){ var self=this; return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", [])); return self;}, args: ["anObject"], source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'), messageSends: ["add:", "yourself", "copy"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_copyWithAll_'), smalltalk.method({ selector: unescape('copyWithAll%3A'), category: 'copying', fn: function (aCollection){ var self=this; return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", [])); return self;}, args: ["aCollection"], source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'), messageSends: ["addAll:", "yourself", "copy"], referencedClasses: [] }), smalltalk.Collection); smalltalk.addMethod( unescape('_asArray'), smalltalk.method({ selector: unescape('asArray'), category: 'converting', fn: function (){ var self=this; var array=nil; var index=nil; array=smalltalk.send((smalltalk.Array || Array), "_new", []); index=(0); smalltalk.send(self, "_do_", [(function(each){index=((($receiver = index).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return smalltalk.send(array, "_at_put_", [index, each]);})]); return array; return self;}, args: [], source: unescape('asArray%0A%09%7C%20array%20index%20%7C%0A%09array%20%3A%3D%20Array%20new.%0A%09index%20%3A%3D%200.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20index%20%3A%3D%20index%20+%201.%0A%09%20%20%20%20array%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Earray'), messageSends: ["new", "do:", unescape("+"), "at:put:"], referencedClasses: ["Array"] }), smalltalk.Collection); smalltalk.addMethod( unescape('_do_'), smalltalk.method({ selector: unescape('do%3A'), category: 'enumerating', fn: function (aBlock){ var self=this; for(var i=0;i aString; return self;}, args: ["aString"], source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('__lt'), smalltalk.method({ selector: unescape('%3C'), category: 'comparing', fn: function (aString){ var self=this; return String(self) < aString; return self;}, args: ["aString"], source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('__gt_eq'), smalltalk.method({ selector: unescape('%3E%3D'), category: 'comparing', fn: function (aString){ var self=this; return String(self) >= aString; return self;}, args: ["aString"], source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('__lt_eq'), smalltalk.method({ selector: unescape('%3C%3D'), category: 'comparing', fn: function (aString){ var self=this; return String(self) <= aString; return self;}, args: ["aString"], source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_remove_'), smalltalk.method({ selector: unescape('remove%3A'), category: 'adding', fn: function (anObject){ var self=this; smalltalk.send(self, "_errorReadOnly", []); return self;}, args: ["anObject"], source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'), messageSends: ["errorReadOnly"], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_trimLeft_'), smalltalk.method({ selector: unescape('trimLeft%3A'), category: 'regular expressions', fn: function (separators){ var self=this; return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]); return self;}, args: ["separators"], source: unescape('trimLeft%3A%20separators%0A%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'), messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")], referencedClasses: ["RegularExpression"] }), smalltalk.String); smalltalk.addMethod( unescape('_trimRight_'), smalltalk.method({ selector: unescape('trimRight%3A'), category: 'regular expressions', fn: function (separators){ var self=this; return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]); return self;}, args: ["separators"], source: unescape('trimRight%3A%20separators%0A%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'), messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")], referencedClasses: ["RegularExpression"] }), smalltalk.String); smalltalk.addMethod( unescape('_trimLeft'), smalltalk.method({ selector: unescape('trimLeft'), category: 'regular expressions', fn: function (){ var self=this; return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]); return self;}, args: [], source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'), messageSends: ["trimLeft:"], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_trimRight'), smalltalk.method({ selector: unescape('trimRight'), category: 'regular expressions', fn: function (){ var self=this; return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]); return self;}, args: [], source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'), messageSends: ["trimRight:"], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_trimBoth'), smalltalk.method({ selector: unescape('trimBoth'), category: 'regular expressions', fn: function (){ var self=this; return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]); return self;}, args: [], source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'), messageSends: ["trimBoth:"], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_trimBoth_'), smalltalk.method({ selector: unescape('trimBoth%3A'), category: 'regular expressions', fn: function (separators){ var self=this; return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]); return self;}, args: ["separators"], source: unescape('trimBoth%3A%20separators%0A%0A%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'), messageSends: ["trimRight:", "trimLeft:"], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_asLowercase'), smalltalk.method({ selector: unescape('asLowercase'), category: 'converting', fn: function (){ var self=this; return self.toLowerCase(); return self;}, args: [], source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_asUppercase'), smalltalk.method({ selector: unescape('asUppercase'), category: 'converting', fn: function (){ var self=this; return self.toUpperCase(); return self;}, args: [], source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_join_'), smalltalk.method({ selector: unescape('join%3A'), category: 'split join', fn: function (aCollection){ var self=this; return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]); return self;}, args: ["aCollection"], source: unescape('join%3A%20aCollection%20%0A%09%5E%20String%0A%09%09streamContents%3A%20%5B%3Astream%20%7C%20aCollection%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20asString%5D%20%0A%09%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20self%5D%5D'), messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"], referencedClasses: ["String"] }), smalltalk.String); smalltalk.addMethod( unescape('_includesSubString_'), smalltalk.method({ selector: unescape('includesSubString%3A'), category: 'testing', fn: function (subString){ var self=this; return self.indexOf(subString) != -1 ; return self;}, args: ["subString"], source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_asciiValue'), smalltalk.method({ selector: unescape('asciiValue'), category: 'accessing', fn: function (){ var self=this; return self.charCodeAt(0);; return self;}, args: [], source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'), messageSends: [], referencedClasses: [] }), smalltalk.String); smalltalk.addMethod( unescape('_lineIndicesDo_'), smalltalk.method({ selector: unescape('lineIndicesDo%3A'), category: 'split join', fn: function (aBlock){ var self=this; try{var cr=nil; var lf=nil; var start=nil; var sz=nil; var nextLF=nil; var nextCR=nil; start=(1); sz=smalltalk.send(self, "_size", []); cr=smalltalk.send((smalltalk.String || String), "_cr", []); nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]); lf=smalltalk.send((smalltalk.String || String), "_lf", []); nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]); (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver