|
||||||||
| 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.tables.ScruTable
|
+--org.abora.gold.collection.tables.MuTable
|
+--org.abora.gold.collection.tables.IntegerTable
The IntegerTable class is used for tables that have arbitrary XuInteger keys in their
domain. Since ScruTable & MuTable already provide all the unboxed versions of the table
protocol, there is little need for this class to be a type. However, this class does
provide a bit of extra protocol convenience: highestIndex & lowestIndex. Unless these are
retired, we cannot retire this class from type status.
Note that there may be tables with XuInteger keys (i.e., IntegerSpace domains) which are
not kinds of IntegerTables. In particular it is perfectly sensible to create a HashTable
with XuInteger keys when the domain region is likely to be sparse.
| Field Summary |
| Fields inherited from class org.abora.gold.collection.tables.MuTable |
AlreadyInTableSignal, NotInDomainSignal, NullInsertionSignal |
| Fields inherited from class org.abora.gold.collection.tables.ScruTable |
NotInTableSignal, WrongCoordSpaceSignal |
| 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 | |
IntegerTable()
Create a new table with an unspecified number of initial domain positions. |
|
| Method Summary | |
void |
atIntIntroduce(IntegerVar key,
Heaper value)
Unboxed version. |
void |
atIntReplace(IntegerVar key,
Heaper value)
Unboxed version. |
void |
atIntroduce(Position key,
Heaper value)
Associate key with value unless key is already associated with another value. |
Heaper |
atIntStore(IntegerVar key,
Heaper value)
Unboxed version. |
void |
atReplace(Position key,
Heaper value)
Associate key with value only if key is already associated with a value. |
Heaper |
atStore(Position key,
Heaper value)
Associate value with key, whether or not there is a previous association. Return the old range element if the position was previously occupied, NULL otherwise |
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. |
IntegerVar |
count()
Return the number of domain elements, which is to say, the number of associations. 'table->count()' should be equivalent to 'table->domain()->count()'. Used to say: 'Return the number of range elements'. |
XnRegion |
domain()
Return an XuRegion representing a snapshot of the current domain. 'table->domain()->hasMember(p)' iff 'table->fetch(p) !!= NULL'. |
ScruTable |
emptySize(IntegerVar size)
Return an empty table just like the current one. |
Heaper |
fetch(Position key)
Return the range element at the domain position key. |
IntegerVar |
highestIndex()
Given that the table is non-empty, 'intTab->highestIndex()' is equivalent to 'CAST(IntegerRegion,intTab->domain())->upperBound() -1'. |
boolean |
includesIntKey(IntegerVar aKey)
Unboxed version. |
boolean |
includesKey(Position aKey)
includesKey is used to test for the presence of a key->value pair in the table. |
Heaper |
intFetch(IntegerVar key)
Unboxed version. |
void |
intRemove(IntegerVar anIdx)
Unboxed version. |
boolean |
intWipe(IntegerVar anIdx)
Unboxed version. |
boolean |
isEmpty()
Is there anything in the table? 'table->isEmpty()' iff 'table->domain()->isEmpty()'. |
IntegerVar |
lowestIndex()
Given that the table is non-empty, 'intTab->lowestIndex()' is equivalent to 'CAST(IntegerRegion,intTab->domain())->lowerBound()'. |
static Heaper |
make()
A new empty IntegerTable |
static Heaper |
make(Heaper something)
|
static Heaper |
make(IntegerRegion reg)
Hint that the domain of the new table will eventually be (or at least resemble) 'reg'. |
static Heaper |
make(IntegerVar someSize)
A new empty IntegerTable. |
static Heaper |
make(IntegerVar fromIdx,
IntegerVar toIdx)
Hint that the domain's lowerBound (inclusive) will eventually be 'fromIdx', and the domain's upperBound (exclusive) will eventually be 'toIdx'. |
static Heaper |
make(MuWordArray wv)
Make a copy of 'wv' as an IntegerTable. |
static Heaper |
make(ScruTable table)
A new IntegerTable initialized from 'table' in a wierd and screwy way |
ScruTable |
offsetSubTableBetween(IntegerVar startIndex,
IntegerVar stopIndex,
IntegerVar firstIndex)
Return a table which contains the elements from start to stop, starting at firstIndex. |
void |
remove(Position aPos)
Remove a key->value association from the table. Blast if the key is not present. |
XnRegion |
runAt(Position key)
Return the length of the run starting at position key. |
XnRegion |
runAtInt(IntegerVar key)
Unboxed version. |
TableStepper |
stepper(OrderSpec order)
Return a TableStepper which will enumerate my key->value mappings. |
ScruTable |
subTable(XnRegion reg)
Return a table which contains only the intersection of this table's domain and the domain specified by 'region'. table->subTable(r)->domain()->isEqual( table->domain()->intersect(r) ). It is unspecified whether the resulting table starts as a snapshot of a subset of me, after which we go our own ways; or whether the resulting table is a view onto a subset of me, such that changes to me are also visible to him. |
ScruTable |
subTableBetween(IntegerVar startIndex,
IntegerVar stopIndex)
Hack for C++ overloading problem |
boolean |
wipe(Position anIdx)
Remove a key->value association from the table. Do not blast (or do anything else) if the key is not in my current domain. Return TRUE if the association was present and removed, Return FALSE if the association was not there |
| Methods inherited from class org.abora.gold.collection.tables.MuTable |
actualHashForEqual, asImmuTable, asMuTable, initTimeNonInherited, introduceAll, introduceAll, introduceAll, isEqual, make, make, problems, removeAll, replaceAll, replaceAll, replaceAll, sendSelfTo, storeAll, storeAll, storeAll, test, wipeAll |
| Methods inherited from class org.abora.gold.collection.tables.ScruTable |
asOrderedCollection, backfollowFrom, contentsEqual, contentsHash, dox, get, intGet, isEqual, printOn, printOnWithSimpleSyntax, printOnWithSyntax, range, stepper, theOne, transformedBy |
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, displayString, error, hack, halt, inspect, 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 |
| Constructor Detail |
public IntegerTable()
| Method Detail |
public void atIntIntroduce(IntegerVar key,
Heaper value)
MuTable
atIntIntroduce in class MuTable
public void atIntReplace(IntegerVar key,
Heaper value)
MuTable
atIntReplace in class MuTable
public Heaper atIntStore(IntegerVar key,
Heaper value)
MuTable
atIntStore in class MuTablepublic CoordinateSpace coordinateSpace()
ScruTable
coordinateSpace in class MuTablepublic IntegerVar count()
ScruTable
count in class MuTablepublic XnRegion domain()
ScruTable
domain in class MuTablepublic IntegerVar highestIndex()
public Heaper intFetch(IntegerVar key)
ScruTable
intFetch in class MuTablepublic void intRemove(IntegerVar anIdx)
MuTable
intRemove in class MuTablepublic boolean intWipe(IntegerVar anIdx)
MuTable
intWipe in class MuTablepublic IntegerVar lowestIndex()
public ScruTable subTable(XnRegion reg)
ScruTable
subTable in class MuTable
public void atIntroduce(Position key,
Heaper value)
MuTable
atIntroduce in class MuTable
public void atReplace(Position key,
Heaper value)
MuTable
atReplace in class MuTable
public Heaper atStore(Position key,
Heaper value)
MuTable
atStore in class MuTablepublic Heaper fetch(Position key)
ScruTable
fetch in class MuTablepublic boolean includesKey(Position aKey)
ScruTable
includesKey in class MuTablepublic void remove(Position aPos)
MuTable
remove in class MuTablepublic XnRegion runAt(Position key)
ScruTable
runAt in class MuTablepublic boolean wipe(Position anIdx)
MuTable
wipe in class MuTablepublic boolean includesIntKey(IntegerVar aKey)
ScruTable
includesIntKey in class MuTablepublic boolean isEmpty()
ScruTable
isEmpty in class MuTablepublic TableStepper stepper(OrderSpec order)
ScruTable
stepper in class MuTablepublic XnRegion runAtInt(IntegerVar key)
ScruTable
runAtInt in class MuTablepublic ScruTable copy()
ScruTable
copy in class MuTablepublic ScruTable emptySize(IntegerVar size)
ScruTable
emptySize in class MuTable
public ScruTable offsetSubTableBetween(IntegerVar startIndex,
IntegerVar stopIndex,
IntegerVar firstIndex)
public ScruTable subTableBetween(IntegerVar startIndex,
IntegerVar stopIndex)
public static Heaper make(Heaper something)
public static Heaper make()
public static Heaper make(IntegerVar someSize)
public static Heaper make(IntegerVar fromIdx,
IntegerVar toIdx)
public static Heaper make(IntegerRegion reg)
public static Heaper make(ScruTable table)
public static Heaper make(MuWordArray wv)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||