Index - All Packages - All Categories - All Classes

Class SetAccumulator

A SetAccumulator accumulates a bunch of objects and then makes an ImmuSet containing all the accumulated objects. Several people have observed that a SetAccumulator doesn't buy you much because instead you could just store into a MuSet. While this is true (and is in fact how SetAccumulator is trivially implemented), my feeling is that if what a loop is doing is enumerating a bunch of elements from which a Set is to be formed, using a SetAccumulator in the loops says this more clearly to readers of the code.

Package: Udanax-Gold
All Superclasses: Object Heaper Accumulator
Protocols: Object
Categories: Xanadu-Collection-Sets

Class Methods

make

Make a SetAccumulator which starts out with no elements accumulated

make: initialSet

Make a new SetAccumulator in which all the current elements of initialSet are already accumulated.
Future changes to initialSet have no effect on the accumulator.

Instance Methods

copy



Overrides: Accumulator

create



Overrides: Heaper

create: initialSet


createRcvr: receiver


get


sendSelfTo: xmtr


step: someObj



Overrides: Accumulator

value



Overrides: Accumulator


Index - All Packages - All Categories - All Classes