|
||||||||
| 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.settable.SetTable
SetTable is a table-like object (NOT at true table) that can store multiple values at a single position. See MuTable for comments on the protocol. The reason that this is not a table subclass is because of several ambiguities in the contract. For example, replace for a table implies that the position must be previously occupied, but in a settable the position is occupied only if the exact association (key->value) is present.
| Field Summary | |
protected CoordinateSpace |
myCoordinateSpace
|
protected SharedPtrArray |
myHashEntries
|
protected int |
myTally
|
| Constructor Summary | |
SetTable(Rcvr receiver)
|
|
SetTable(SharedPtrArray entries,
int tally,
CoordinateSpace cs)
|
|
| Method Summary | |
void |
aboutToWrite()
If my contents are shared, and I'm about to change them, make a copy of them. |
int |
actualHashForEqual()
Defined by subclasses to produce the value returned by hashForEqual. |
boolean |
atIncludes(Position key,
Heaper value)
|
void |
atIntIntroduce(IntegerValue index,
Heaper anObject)
|
void |
atIntroduce(Position aKey,
Heaper anObject)
Store anObject at position aKey; BLAST if position is already occupied (for SetTable, there must be an object that isEqual to anObject at aKey for the position to be considered occupied) |
boolean |
atIntStore(IntegerValue index,
Heaper anObject)
|
boolean |
atStore(Position aKey,
Heaper anObject)
Store anObject at position aKey; return TRUE if store accomplished, FALSE otherwise |
void |
checkSize()
|
CoordinateSpace |
coordinateSpace()
|
IntegerValue |
count()
|
void |
destruct()
|
XnRegion |
domain()
|
SetTable |
emptySize(IntegerValue size)
return an empty table just like the current one |
boolean |
includesKey(Position aKey)
|
void |
intRemove(IntegerValue index,
Heaper value)
|
boolean |
isEmpty()
|
boolean |
isEqual(Heaper other)
Return true if the two objects are equal. |
static SetTable |
make(CoordinateSpace cs)
|
static SetTable |
make(CoordinateSpace cs,
IntegerValue size)
|
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 |
remove(Position key,
Heaper value)
|
XnRegion |
runAt(Position index)
|
XnRegion |
runAtInt(IntegerValue index)
|
void |
sendSelfTo(Xmtr xmtr)
|
TableStepper |
stepper()
|
TableStepper |
stepper(OrderSpec order)
ignore order spec for now |
Stepper |
stepperAt(Position key)
|
Stepper |
stepperAtInt(IntegerValue index)
|
void |
storeEntry(TableEntry entry)
|
boolean |
wipe(IntegerValue index,
Heaper value)
|
boolean |
wipeAssociation(Position key,
Heaper value)
|
| Methods inherited from class org.abora.white.xpp.basic.Heaper |
destroy, equals, hashForEqual, printContentsOn, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected SharedPtrArray myHashEntries
protected int myTally
protected CoordinateSpace myCoordinateSpace
| Constructor Detail |
public SetTable(SharedPtrArray entries,
int tally,
CoordinateSpace cs)
public SetTable(Rcvr receiver)
| Method Detail |
public void atIntroduce(Position aKey,
Heaper anObject)
public boolean atStore(Position aKey,
Heaper anObject)
public void atIntIntroduce(IntegerValue index,
Heaper anObject)
public boolean atIntStore(IntegerValue index,
Heaper anObject)
public CoordinateSpace coordinateSpace()
public IntegerValue count()
public XnRegion domain()
public void intRemove(IntegerValue index,
Heaper value)
public void remove(Position key,
Heaper value)
public boolean wipe(IntegerValue index,
Heaper value)
public boolean wipeAssociation(Position key,
Heaper value)
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 XnRegion runAt(Position index)
public XnRegion runAtInt(IntegerValue index)
public TableStepper stepper(OrderSpec order)
public Stepper stepperAt(Position key)
public Stepper stepperAtInt(IntegerValue index)
public void destruct()
destruct in class Heaperpublic SetTable emptySize(IntegerValue size)
public TableStepper stepper()
public boolean atIncludes(Position key,
Heaper value)
public boolean includesKey(Position aKey)
public boolean isEmpty()
public void aboutToWrite()
public void checkSize()
public void storeEntry(TableEntry entry)
public int actualHashForEqual()
Heaper
actualHashForEqual in class Heaperpublic boolean isEqual(Heaper other)
Heaper
isEqual in class Heaperpublic void sendSelfTo(Xmtr xmtr)
sendSelfTo in class Heaperpublic static SetTable make(CoordinateSpace cs)
public static SetTable make(CoordinateSpace cs,
IntegerValue size)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||