org.abora.gold.collection.settable
Class SetTable

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.collection.settable.SetTable

public class SetTable
extends Heaper

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
           
 
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
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()
           
 boolean atIncludes(Position key, Heaper value)
           
 void atIntIntroduce(IntegerVar 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(IntegerVar 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()
           
 IntegerVar count()
           
 void destruct()
          Classes should implement this message rather than a destructor.
 XnRegion domain()
           
 SetTable emptySize(IntegerVar size)
          return an empty table just like the current one
 boolean includesKey(Position aKey)
           
 void inspect()
           
 void intRemove(IntegerVar index, Heaper value)
           
 boolean isEmpty()
           
 boolean isEqual(java.lang.Object other)
           
static Heaper make(CoordinateSpace cs)
           
static Heaper make(CoordinateSpace cs, IntegerVar size)
           
 void printOn(java.io.PrintWriter oo)
           
 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(IntegerVar index)
           
 void sendSelfTo(Xmtr xmtr)
          do nothing
 void stepper()
           
 TableStepper stepper(OrderSpec order)
          ignore order spec for now
 Stepper stepperAt(Position key)
           
 Stepper stepperAtInt(IntegerVar index)
           
 void storeEntry(TableEntry entry)
           
 boolean wipe(IntegerVar index, Heaper value)
           
 boolean wipeAssociation(Position key, Heaper value)
           
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, linkTimeNonInherited, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
Methods inherited from class org.abora.gold.java.AboraHeaper
asOop, basicInspect, displayString, error, hack, halt, 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
 

Field Detail

myHashEntries

protected SharedPtrArray myHashEntries

myTally

protected int myTally

myCoordinateSpace

protected CoordinateSpace myCoordinateSpace
Constructor Detail

SetTable

public SetTable(SharedPtrArray entries,
                int tally,
                CoordinateSpace cs)

SetTable

public SetTable(Rcvr receiver)
Method Detail

atIntroduce

public 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)


atStore

public boolean atStore(Position aKey,
                       Heaper anObject)
Store anObject at position aKey; return TRUE if store accomplished, FALSE otherwise


atIntIntroduce

public void atIntIntroduce(IntegerVar index,
                           Heaper anObject)

atIntStore

public boolean atIntStore(IntegerVar index,
                          Heaper anObject)

coordinateSpace

public CoordinateSpace coordinateSpace()

count

public IntegerVar count()

domain

public XnRegion domain()

intRemove

public void intRemove(IntegerVar index,
                      Heaper value)

remove

public void remove(Position key,
                   Heaper value)

wipe

public boolean wipe(IntegerVar index,
                    Heaper value)

wipeAssociation

public boolean wipeAssociation(Position key,
                               Heaper value)

printOn

public void printOn(java.io.PrintWriter oo)
Overrides:
printOn in class Heaper

printOnWithSimpleSyntax

public void printOnWithSimpleSyntax(java.io.PrintWriter oo,
                                    java.lang.String open,
                                    java.lang.String sep,
                                    java.lang.String close)

runAt

public XnRegion runAt(Position index)

runAtInt

public XnRegion runAtInt(IntegerVar index)

stepper

public TableStepper stepper(OrderSpec order)
ignore order spec for now


stepperAt

public Stepper stepperAt(Position key)

stepperAtInt

public Stepper stepperAtInt(IntegerVar index)

destruct

public void destruct()
Description copied from class: Heaper
Classes should implement this message rather than a destructor. We use this so
the destruction behavior implemented in abstract superclasses can access the
vtable of the concrete run-time type in C++. Using a message makes C++
parallel the Smalltalk semantics for delete. Destroy will actually call the destructor.

Overrides:
destruct in class Heaper

emptySize

public SetTable emptySize(IntegerVar size)
return an empty table just like the current one


stepper

public void stepper()

atIncludes

public boolean atIncludes(Position key,
                          Heaper value)

includesKey

public boolean includesKey(Position aKey)

isEmpty

public boolean isEmpty()

aboutToWrite

public void aboutToWrite()
If my contents are shared, and I'm about to change them, make a copy of them.


checkSize

public void checkSize()

storeEntry

public void storeEntry(TableEntry entry)

inspect

public void inspect()
Overrides:
inspect in class AboraHeaper

actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class Heaper

isEqual

public boolean isEqual(java.lang.Object other)

sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Description copied from class: Heaper
do nothing

Overrides:
sendSelfTo in class Heaper

make

public static Heaper make(CoordinateSpace cs)

make

public static Heaper make(CoordinateSpace cs,
                          IntegerVar size)


Translation - Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.