|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.gold.java.AboraHeaper
|
+--org.abora.gold.xpp.basic.Heaper
|
+--org.abora.gold.collection.steppers.Accumulator
|
+--org.abora.gold.collection.sets.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.
| Field Summary | |
protected MuSet |
muSet
|
| Fields inherited from class org.abora.gold.xpp.basic.Heaper |
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes |
| Fields inherited from class org.abora.gold.java.AboraHeaper |
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag |
| Constructor Summary | |
SetAccumulator()
|
|
SetAccumulator(Rcvr receiver)
|
|
SetAccumulator(ScruSet initialSet)
|
|
| Method Summary | |
Accumulator |
copy()
Return a new Accumulator just like the current one, except that from now on they accumulate separately |
ImmuSet |
get()
|
static Heaper |
make()
Make a SetAccumulator which starts out with no elements accumulated |
static Heaper |
make(ScruSet 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. |
void |
sendSelfTo(Xmtr xmtr)
do nothing |
void |
step(Heaper someObj)
Accumulate a new object into the Accumulator |
Heaper |
value()
Return the object that results from accumulating all those objects |
| Methods inherited from class org.abora.gold.collection.steppers.Accumulator |
actualHashForEqual, isEqual, ptrArray |
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected MuSet muSet
| Constructor Detail |
public SetAccumulator()
public SetAccumulator(ScruSet initialSet)
public SetAccumulator(Rcvr receiver)
| Method Detail |
public void step(Heaper someObj)
Accumulator
step in class Accumulatorpublic Heaper value()
Accumulator
value in class Accumulatorpublic Accumulator copy()
Accumulator
copy in class Accumulatorpublic ImmuSet get()
public void sendSelfTo(Xmtr xmtr)
Heaper
sendSelfTo in class Heaperpublic static Heaper make()
public static Heaper make(ScruSet initialSet)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||