|
||||||||
| 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
X++ has three basic kinds of collection classes. Tables, Sets and XuRegions. XuRegions are not-necessarily-discrete collections of positions, and are documented in the space module. Sets and Tables are both discrete and finite, and similar in many ways. Both originate in a three-way type distinction between:
Immu's are sort of like Stamps -- they represent a particular state a colection can have.
Mu's are sort of like Berts -- they represent a continuing collection identity which can change its current state.
Sets are pure collections--their contents are just a set of Heapers. Sets (as opposed to tables) do not provide any organization of these contents.
| Constructor Summary | |
protected |
ScruSet()
|
protected |
ScruSet(Rcvr rcvr)
|
| Method Summary | |
int |
actualHashForEqual()
Defined by subclasses to produce the value returned by hashForEqual. |
PtrArray |
asArray()
The elements in the set in an array, in some random order |
abstract ImmuSet |
asImmuSet()
Return an immu snapshot of my current state. |
abstract MuSet |
asMuSet()
Return a Mu whose initial state is the same as my current state, but which will now deviate independently of me. |
boolean |
contentsEqual(ScruSet other)
Returns whether the two ScruSets have exactly the same set of elements at the moment. |
int |
contentsHash()
Has the same relationship to contentsEqual that hashForEqual has to isEqual. |
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. |
abstract boolean |
hasMember(Heaper someone)
Is someone a member of the set now? |
boolean |
intersects(ScruSet other)
Return true if this set and the other
set have any elements in common. |
abstract boolean |
isEmpty()
Return true if this set does not currently have
any elements. |
abstract boolean |
isEqual(Heaper other)
Return true if the two objects are equal. |
boolean |
isSubsetOf(ScruSet another)
Whether another currently has all my elements |
void |
printOn(java.io.PrintWriter oo)
This should rarely be overridden. |
void |
printOnWithSimpleSyntax(java.io.PrintWriter oo,
java.lang.String open,
java.lang.String sep,
java.lang.String close)
|
void |
printOnWithSyntax(java.io.PrintWriter oo,
java.lang.String openMarker,
java.lang.String separator,
java.lang.String closeMarker,
boolean fullPrint)
For example, if we have the set '{a, b, c}' and we print it with 'p->printOnWithSyntax(oo, |
abstract Stepper |
stepper()
Returns a stepper which will enumerate all the elements of the set in some unspecified order |
Heaper |
theOne()
Iff I contain exactly one member, return it. |
| 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 ScruSet()
protected ScruSet(Rcvr rcvr)
| Method Detail |
public int actualHashForEqual()
Heaper
actualHashForEqual in class Heaperpublic boolean contentsEqual(ScruSet other)
public int contentsHash()
public abstract boolean hasMember(Heaper someone)
public boolean intersects(ScruSet other)
this set and the other
set have any elements in common.
Subclasses may want to override for efficiency.
other - other set to test for an intersection with
public abstract boolean isEmpty()
this set does not currently have
any elements.
this set does not currently have any
elements.public abstract boolean isEqual(Heaper other)
Heaper
isEqual in class Heaperpublic boolean isSubsetOf(ScruSet another)
public abstract ScruSet copy()
public PtrArray asArray()
public abstract ImmuSet asImmuSet()
public abstract MuSet asMuSet()
public void printOn(java.io.PrintWriter oo)
Heaper
printOn in class Heaper
public void printOnWithSimpleSyntax(java.io.PrintWriter oo,
java.lang.String open,
java.lang.String sep,
java.lang.String close)
public void printOnWithSyntax(java.io.PrintWriter oo,
java.lang.String openMarker,
java.lang.String separator,
java.lang.String closeMarker,
boolean fullPrint)
public abstract IntegerValue count()
public abstract Stepper stepper()
public Heaper theOne()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||