org.abora.white.collection.settable
Class TableEntry

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.collection.settable.TableEntry
Direct Known Subclasses:
HashIndexEntry, HeaperAsEntry, IndexEntry, PositionEntry

public abstract class TableEntry
extends Heaper


Field Summary
protected  TableEntry myNext
           
protected  Heaper myValue
           
 
Constructor Summary
TableEntry(Heaper value)
           
TableEntry(Rcvr receiver)
           
TableEntry(TableEntry next, Heaper value)
           
 
Method Summary
 int actualHashForEqual()
          Defined by subclasses to produce the value returned by hashForEqual.
static TableStepper bucketStepper(SharedPtrArray array)
           
abstract  TableEntry copy()
           
 void destroy()
          temporarily don't destroy.
 TableEntry fetchNext()
           
 IntegerValue index()
           
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
static TableEntry make(IntegerValue index, Heaper value)
           
static TableEntry make(Position key, Heaper value)
           
abstract  boolean match(Position key)
          Return true if my key matches key.
 boolean matchInt(IntegerValue index)
          Return true if my key matches the position associated with index.
 boolean matchValue(Heaper value)
          Return true if my value matches value.
abstract  Position position()
           
 void printOn(java.io.PrintWriter oo)
          This should rarely be overridden.
 boolean replaceValue(Heaper newValue)
          Return true if my value can be replaced in place, and false if the entire entry must be replaced.
 void sendSelfTo(Xmtr xmtr)
           
 void setNext(TableEntry next)
          Change my pointer to the rest of the chain in this bucket.
 Heaper value()
           
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destruct, equals, hashForEqual, printContentsOn, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myNext

protected TableEntry myNext

myValue

protected Heaper myValue
Constructor Detail

TableEntry

public TableEntry(Heaper value)

TableEntry

public TableEntry(TableEntry next,
                  Heaper value)

TableEntry

public TableEntry(Rcvr receiver)
Method Detail

copy

public abstract TableEntry copy()

fetchNext

public TableEntry fetchNext()

index

public IntegerValue index()

match

public abstract boolean match(Position key)
Return true if my key matches key.


matchInt

public boolean matchInt(IntegerValue index)
Return true if my key matches the position associated with index.


matchValue

public boolean matchValue(Heaper value)
Return true if my value matches value. Note that this *must* test EQ first in case the value is no longer a heaper. Otherwise we could never remove a destructed object.


position

public abstract Position position()

replaceValue

public boolean replaceValue(Heaper newValue)
Return true if my value can be replaced in place, and false if the entire entry must be replaced.


setNext

public void setNext(TableEntry next)
Change my pointer to the rest of the chain in this bucket.


value

public Heaper value()

printOn

public void printOn(java.io.PrintWriter oo)
Description copied from class: Heaper
This should rarely be overridden. In Tofu, it prints ClassName(...), where ... is either produced by printInsideOn or is ??? if printInsideOn it not overridden.

Overrides:
printOn in class Heaper

destroy

public void destroy()
temporarily don't destroy.

Overrides:
destroy in class Heaper

actualHashForEqual

public int actualHashForEqual()
Description copied from class: Heaper
Defined by subclasses to produce the value returned by hashForEqual.

Overrides:
actualHashForEqual in class Heaper

isEqual

public boolean isEqual(Heaper other)
Description copied from class: Heaper
Return true if the two objects are equal.

Specified by:
isEqual in class Heaper

sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Overrides:
sendSelfTo in class Heaper

bucketStepper

public static TableStepper bucketStepper(SharedPtrArray array)

make

public static TableEntry make(IntegerValue index,
                              Heaper value)

make

public static TableEntry make(Position key,
                              Heaper value)


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