|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.white.xpp.basic.Heaper
|
+--org.abora.white.collection.sets.ScruSet
|
+--org.abora.white.collection.sets.MuSet
MuSets are a changable collection of elements. Added to the ScruSet protocol are messages for performing these changes. The "introduce/store/wipe/remove" suite is defined by analogy with similar methods in MuTable. See both ScruSet and MuTable.
| Constructor Summary | |
protected |
MuSet()
|
protected |
MuSet(Rcvr rcvr)
|
| Method Summary | |
int |
actualHashForEqual()
Defined by subclasses to produce the value returned by hashForEqual. |
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. |
abstract ScruSet |
copy()
A new one whose initial state is my current state, but that doesn't track changes. |
abstract IntegerValue |
count()
How many elements are currently in the set. |
static MuSet |
fromStepper(Stepper stepper)
|
abstract boolean |
hasMember(Heaper someone)
Is someone a member of the set now? |
protected abstract Stepper |
immuStepper()
|
abstract void |
introduce(Heaper anElement)
Add anElement to my members, but only if it isn't already a member. |
abstract boolean |
isEmpty()
Return true if this set does not currently have
any elements. |
boolean |
isEqual(Heaper other)
Return true if the two objects are equal. |
static MuSet |
make()
|
static MuSet |
make(Heaper item)
|
static MuSet |
make(IntegerValue someSize)
someSize is a non-semantic hint about how big the set might get. |
abstract void |
remove(Heaper anElement)
Remove anElement from my members. |
void |
restrictTo(ScruSet other)
Sort of intersect. |
abstract Stepper |
stepper()
Returns a stepper which will enumerate all the elements of the set in some unspecified order |
abstract void |
store(Heaper anElement)
Add anElement to my set of members. |
void |
storeAll(ScruSet other)
Sort of union. |
abstract void |
wipe(Heaper anElement)
make anElement no longer be one of my members. |
void |
wipeAll(ScruSet other)
Sort of minus. |
| Methods inherited from class org.abora.white.collection.sets.ScruSet |
asArray, contentsEqual, contentsHash, intersects, isSubsetOf, printOn, printOnWithSimpleSyntax, printOnWithSyntax, theOne |
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
destroy, destruct, equals, hashForEqual, printContentsOn, sendSelfTo, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected MuSet()
protected MuSet(Rcvr rcvr)
| Method Detail |
public static MuSet fromStepper(Stepper stepper)
public static MuSet make()
public static MuSet make(Heaper item)
public static MuSet make(IntegerValue someSize)
public abstract boolean hasMember(Heaper someone)
ScruSet
hasMember in class ScruSetpublic abstract boolean isEmpty()
ScruSetthis set does not currently have
any elements.
isEmpty in class ScruSetthis set does not currently have any
elements.public void restrictTo(ScruSet other)
public void storeAll(ScruSet other)
public void wipeAll(ScruSet other)
public abstract void introduce(Heaper anElement)
public abstract void remove(Heaper anElement)
public abstract void store(Heaper anElement)
public abstract void wipe(Heaper anElement)
public abstract ScruSet copy()
ScruSet
copy in class ScruSetpublic ImmuSet asImmuSet()
ScruSet
asImmuSet in class ScruSetpublic MuSet asMuSet()
ScruSet
asMuSet in class ScruSetpublic abstract IntegerValue count()
ScruSet
count in class ScruSetpublic abstract Stepper stepper()
ScruSet
stepper in class ScruSetprotected abstract Stepper immuStepper()
public int actualHashForEqual()
Heaper
actualHashForEqual in class ScruSetpublic boolean isEqual(Heaper other)
Heaper
isEqual in class ScruSet
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||