|
||||||||
| 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.sets.ScruSet
|
+--org.abora.gold.collection.sets.ImmuSet
ImmuSets are ScruSets which are guaranteed never to change. ImmuSets correspond to the
mathematical notion of a finite set of elements, except of course that here the elements
can be any valid X++ object. Just like mathematical sets, two are equal (according to
isEqual) iff they have the same elements. Just because the set cannot change, that
doesn''t prevent any of the members from undergoing state change.
ImmuSets implement some additional protocol to make new sets out of old ones according to
the familiar set theoretic operators (like intersect). XuRegions are much like ImmuSets
of Positions except that they aren''t necessarily finite or even enumerable. XuRegions
implement a similar protocol, but aren''t polymorphic with ImmuSets.
| Field Summary | |
protected static ImmuSet |
EmptySet
|
| 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 | |
ImmuSet()
|
|
| Method Summary | |
int |
actualHashForEqual()
|
ImmuSet |
asImmuSet()
Return an immu snapshot of my current state. |
MuSet |
asMuSet()
Return a Mu whose initial state is the same as my current state, but which will now deviate independently of me. |
ScruSet |
copy()
don't need to actually make a copy, as this is immutable |
IntegerVar |
count()
How many elements are currently in the set. |
static void |
create(java.lang.Object ms)
Create the frame and call the constructor defined for instances. |
static ImmuSet |
from(MuSet set)
This is for ImmuSet subclasses to produce results from temporary MuSets. The difference between this and ImmuSet make.MuSet: is that this doesn't make a copy of the MuSet when making an ImmuSetOnMu. |
boolean |
hasMember(Heaper someone)
Is someone a member of the set now? |
static void |
initTimeNonInherited()
|
ImmuSet |
intersect(ScruSet another)
Regular set intersection. |
boolean |
isEmpty()
Whether it currently has any elements |
boolean |
isEqual(Heaper other)
Return true if the two objects are equal. |
static void |
linkTimeNonInherited()
|
static Heaper |
make()
|
static Heaper |
make(Heaper aSingleton)
|
static Heaper |
make(MuSet set)
|
static Heaper |
make(java.lang.Object thing)
|
ImmuSet |
minus(ScruSet another)
Return an ImmuSet containing those of my members which aren't members of 'another' |
static ImmuSet |
newWith(Heaper value)
A single element ImmuSet |
Stepper |
stepper()
Returns a stepper which will enumerate all the elements of the set in some unspecified order |
ImmuSet |
unionWith(ScruSet another)
Return an ImmuSet containing those objects with are members of either of us |
ImmuSet |
with(Heaper anElement)
'set->with (anElement)' means the same as 'set->unionWith (immuSet (anElement))'. It returns an ImmuSet with all my members and having anElement as a member. If anElement is a member of me, then the result is identical to me. |
ImmuSet |
without(Heaper anElement)
'set->without (anElement)' means the same as 'set->minus (immuSet (anElement))'. It returns an ImmuSet with all my members except anElement. |
| Methods inherited from class org.abora.gold.collection.sets.ScruSet |
asArray, asOrderedCollection, contentsEqual, contentsHash, dox, inspect, intersects, isSubsetOf, printOn, printOnWithSimpleSyntax, printOnWithSyntax, problems, theOne |
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, displayString, error, hack, halt, 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 static ImmuSet EmptySet
| Constructor Detail |
public ImmuSet()
| Method Detail |
public boolean hasMember(Heaper someone)
ScruSet
hasMember in class ScruSetpublic boolean isEmpty()
ScruSet
isEmpty in class ScruSetpublic ImmuSet intersect(ScruSet another)
public ImmuSet minus(ScruSet another)
public ImmuSet unionWith(ScruSet another)
public ImmuSet with(Heaper anElement)
public ImmuSet without(Heaper anElement)
public ScruSet copy()
copy in class ScruSetpublic ImmuSet asImmuSet()
ScruSet
asImmuSet in class ScruSetpublic MuSet asMuSet()
ScruSet
asMuSet in class ScruSetpublic IntegerVar count()
ScruSet
count in class ScruSetpublic Stepper stepper()
ScruSet
stepper in class ScruSetpublic int actualHashForEqual()
actualHashForEqual in class ScruSetpublic boolean isEqual(Heaper other)
Heaper
isEqual in class ScruSetpublic static void create(java.lang.Object ms)
Heaper
public static Heaper make(java.lang.Object thing)
public static ImmuSet from(MuSet set)
public static Heaper make()
public static Heaper make(MuSet set)
public static ImmuSet newWith(Heaper value)
public static void initTimeNonInherited()
public static void linkTimeNonInherited()
public static Heaper make(Heaper aSingleton)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||