|
||||||||
| 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.ImmuTable
ImmuTable are to ScruTables much like ImmuSets are to ScruSets. See ImmuSet. The ImmuTable subclass of tables represents all tables which CANNOT be side-effected during operations on them. They are intended to represent mathematical abstractions (such as vectors) and are intended to be used in a functional-programming style. Operations are provided for building new ImmuTables out of old ones.
| Constructor Summary | |
protected |
ImmuTable()
|
protected |
ImmuTable(Rcvr rcvr)
|
| Method Summary | |
int |
actualHashForEqual()
See ScruTable::isEqual |
ImmuTable |
asImmuTable()
Return a side-effect-free snapshot of my current contents. |
abstract MuTable |
asMuTable()
Return a side-effectable version of the same table. |
abstract ImmuTable |
combineWith(ImmuTable other)
Similar to unionWith. |
abstract CoordinateSpace |
coordinateSpace()
The kind of elements used to index into the table are Positions of this coordinate space. |
ScruTable |
copy()
don't need to actually make a copy, as this is immutable |
abstract IntegerValue |
count()
Return the number of domain elements, which is to say, the number of associations. |
abstract XnRegion |
domain()
Return an XuRegion representing a snapshot of the current domain. |
abstract ScruTable |
emptySize(IntegerValue size)
The idea of a 'size' argument would seem kind of ridiculous here as the resulting empty table can't be changed. |
abstract Heaper |
fetch(Position key)
Return the range element at the domain position key. |
boolean |
includesIntKey(IntegerValue aKey)
Unboxed version. |
abstract 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. |
abstract boolean |
isEmpty()
Is there anything in the table? 'table->isEmpty()' iff 'table->domain()->isEmpty()'. |
boolean |
isEqual(Heaper other)
All MuTable subclasses have equality based on identity (now and forever equal. |
static Heaper |
make(CoordinateSpace cs)
An empty ImmuTable whose domain space is 'cs'. |
static Heaper |
make(java.lang.Object something)
(something isKindOf: MuTable) ifTrue: [^self make.MuTable: something]. |
static ImmuTable |
offsetImmuTable(ImmuTable aTable,
Dsp aDsp)
|
abstract XnRegion |
runAt(Position key)
Return the length of the run starting at position key. |
abstract XnRegion |
runAtInt(IntegerValue key)
Unboxed version. |
abstract TableStepper |
stepper(OrderSpec order)
Return a TableStepper which will enumerate my key->value mappings. |
abstract ScruTable |
subTable(XnRegion reg)
Return a table which contains only the intersection of this table's domain and the domain specified by 'region'. |
ScruTable |
transformedBy(Dsp dsp)
Return a ScruTable with the domain of the receiver transformed by the Dsp. |
abstract ImmuTable |
without(Position index)
Return a new table just like the current one except with the association whose key is 'index'. |
| Methods inherited from class org.abora.white.collection.tables.ScruTable |
backfollowFrom, contentsEqual, contentsHash, get, intGet, printOn, printOnWithSimpleSyntax, printOnWithSyntax, problems, range, stepper, 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 ImmuTable()
protected ImmuTable(Rcvr rcvr)
| Method Detail |
public abstract CoordinateSpace coordinateSpace()
ScruTable
coordinateSpace in class ScruTablepublic abstract IntegerValue count()
ScruTable
count in class ScruTablepublic abstract XnRegion domain()
ScruTable
domain in class ScruTablepublic abstract Heaper fetch(Position key)
ScruTable
fetch in class ScruTablepublic Heaper intFetch(IntegerValue key)
ScruTable
intFetch in class ScruTablepublic abstract XnRegion runAt(Position key)
ScruTable
runAt in class ScruTablepublic abstract XnRegion runAtInt(IntegerValue key)
ScruTable
runAtInt in class ScruTablepublic abstract ScruTable subTable(XnRegion reg)
ScruTable
subTable in class ScruTablepublic ScruTable transformedBy(Dsp dsp)
transformedBy in class ScruTablepublic ScruTable copy()
copy in class ScruTablepublic abstract ScruTable emptySize(IntegerValue size)
emptySize in class ScruTablepublic abstract ImmuTable combineWith(ImmuTable other)
public abstract ImmuTable without(Position index)
public int actualHashForEqual()
ScruTable
actualHashForEqual in class ScruTablepublic boolean includesIntKey(IntegerValue aKey)
ScruTable
includesIntKey in class ScruTablepublic abstract boolean includesKey(Position aKey)
ScruTable
includesKey in class ScruTablepublic abstract boolean isEmpty()
ScruTable
isEmpty in class ScruTablepublic boolean isEqual(Heaper other)
ScruTable
isEqual in class ScruTablepublic abstract TableStepper stepper(OrderSpec order)
ScruTable
stepper in class ScruTablepublic ImmuTable asImmuTable()
ScruTable
asImmuTable in class ScruTablepublic abstract MuTable asMuTable()
ScruTable
asMuTable in class ScruTablepublic static Heaper make(CoordinateSpace cs)
public static ImmuTable offsetImmuTable(ImmuTable aTable,
Dsp aDsp)
public static Heaper make(java.lang.Object something)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||