|
||||||||
| 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.tables.ScruTable
|
+--org.abora.white.collection.tables.MuTable
|
+--org.abora.white.collection.tables.HashTable
|
+--org.abora.white.collection.tables.ActualHashTable
The HashTable is an implementation class that is intended to provide the weakest Position->Object mapping. It can map from arbitrary Position classes (such as HeaperAsPosition or TreePosition). HashTable can also be used for very sparse integer domains. HashTable, and the entire hashtab module, is private implementation. Not to be included by clients.
| Field Summary | |
protected CoordinateSpace |
myCoordinateSpace
|
protected SharedPtrArray |
myHashEntries
|
protected int |
myTally
|
| Constructor Summary | |
ActualHashTable(Rcvr receiver)
|
|
ActualHashTable(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. |
Heaper |
atIntStore(IntegerValue key,
Heaper aHeaper)
Unboxed version. |
Heaper |
atStore(Position key,
Heaper aHeaper)
Associate value with key, whether or not there is a previous association. |
void |
checkSize()
|
CoordinateSpace |
coordinateSpace()
The kind of elements used to index into the table are Positions of this coordinate space. |
ScruTable |
copy()
A new one whose initial state is my current state, but that doesn't track changes. |
IntegerValue |
count()
Return the number of domain elements, which is to say, the number of associations. |
void |
destruct()
|
XnRegion |
domain()
Return an XuRegion representing a snapshot of the current domain. |
ScruTable |
emptySize(IntegerValue size)
Return an empty table just like the current one. |
int |
fastHash()
|
Heaper |
fetch(Position key)
Return the range element at the domain position key. |
boolean |
includesKey(Position aKey)
includesKey is used to test for the presence of a key->value pair in the table. |
Heaper |
intFetch(IntegerValue key)
Unboxed version. |
boolean |
isEmpty()
Is there anything in the table? 'table->isEmpty()' iff 'table->domain()->isEmpty()'. |
static MuTable |
make(CoordinateSpace cs)
A new empty MuTable whose domain space is 'cs'. |
static HashTable |
make(CoordinateSpace cs,
IntegerValue size)
|
void |
printOn(java.io.PrintWriter oo)
This should rarely be overridden. |
void |
receiveHashTable(Rcvr rcvr)
This currently doesn't take advantage of the optimizations in TableEntries. |
XnRegion |
runAt(Position index)
Return the length of the run starting at position key. |
void |
sendHashTable(Xmtr xmtr)
This currently doesn't take advantage of the optimizations in TableEntries. |
void |
sendSelfTo(Xmtr xmtr)
|
TableStepper |
stepper(OrderSpec order)
ignore order spec for now |
void |
storeEntry(TableEntry anEntry)
Store the tableentry into the entry table |
ScruTable |
subTable(XnRegion region)
Return a table which contains only the intersection of this table's domain and the domain specified by 'region'. |
Heaper |
theOne()
Iff I contain exactly one range element, return it. |
boolean |
wipe(Position aKey)
Remove a key->value association from the table. |
| Methods inherited from class org.abora.white.collection.tables.MuTable |
actualHashForEqual, asImmuTable, asMuTable, atIntIntroduce, atIntReplace, atIntroduce, atReplace, includesIntKey, intRemove, introduceAll, introduceAll, introduceAll, intWipe, isEqual, make, problems, remove, removeAll, replaceAll, replaceAll, replaceAll, runAtInt, storeAll, storeAll, storeAll, wipeAll |
| Methods inherited from class org.abora.white.collection.tables.ScruTable |
backfollowFrom, contentsEqual, contentsHash, get, intGet, printOnWithSimpleSyntax, printOnWithSyntax, range, stepper, transformedBy |
| 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 ActualHashTable(SharedPtrArray entries,
int tally,
CoordinateSpace cs)
public ActualHashTable(Rcvr receiver)
| Method Detail |
public Heaper atStore(Position key,
Heaper aHeaper)
HashTable
atStore in class HashTable
public Heaper atIntStore(IntegerValue key,
Heaper aHeaper)
MuTable
atIntStore in class MuTablepublic CoordinateSpace coordinateSpace()
ScruTable
coordinateSpace in class HashTablepublic IntegerValue count()
ScruTable
count in class HashTablepublic XnRegion domain()
ScruTable
domain in class HashTablepublic Heaper fetch(Position key)
ScruTable
fetch in class HashTablepublic Heaper intFetch(IntegerValue key)
ScruTable
intFetch in class MuTablepublic ScruTable subTable(XnRegion region)
ScruTable
subTable in class HashTablepublic boolean wipe(Position aKey)
HashTable
wipe in class HashTablepublic int fastHash()
public boolean includesKey(Position aKey)
ScruTable
includesKey in class HashTablepublic boolean isEmpty()
ScruTable
isEmpty in class HashTablepublic ScruTable copy()
ScruTable
copy in class HashTablepublic ScruTable emptySize(IntegerValue size)
ScruTable
emptySize in class HashTablepublic void printOn(java.io.PrintWriter oo)
Heaper
printOn in class ScruTablepublic XnRegion runAt(Position index)
ScruTable
runAt in class HashTablepublic TableStepper stepper(OrderSpec order)
stepper in class HashTablepublic Heaper theOne()
ScruTable
theOne in class HashTablepublic void receiveHashTable(Rcvr rcvr)
public void sendHashTable(Xmtr xmtr)
public void destruct()
destruct in class Heaperpublic void aboutToWrite()
public void checkSize()
public void storeEntry(TableEntry anEntry)
public void sendSelfTo(Xmtr xmtr)
sendSelfTo in class MuTablepublic static MuTable make(CoordinateSpace cs)
MuTable
public static HashTable make(CoordinateSpace cs,
IntegerValue size)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||