[Abora-cvs] abora-ash/src/org/abora/ash/ent SplitNode.java,1.2,1.3 CollectionLeaf.java,1.2,1.3
Status: Alpha
Brought to you by:
dgjones
From: <dg...@us...> - 2003-05-09 13:58:50
|
Update of /cvsroot/abora/abora-ash/src/org/abora/ash/ent In directory sc8-pr-cvs1:/tmp/cvs-serv2145/src/org/abora/ash/ent Modified Files: SplitNode.java CollectionLeaf.java Log Message: -Start split node testing Index: SplitNode.java =================================================================== RCS file: /cvsroot/abora/abora-ash/src/org/abora/ash/ent/SplitNode.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SplitNode.java 8 May 2003 13:53:09 -0000 1.2 --- SplitNode.java 9 May 2003 13:58:47 -0000 1.3 *************** *** 143,147 **** } ! protected void setDspForChild(int dsp, EntNode node) { assertIsChild(node); if (left == node) { --- 143,147 ---- } ! public void setDspForChild(int dsp, EntNode node) { assertIsChild(node); if (left == node) { *************** *** 158,162 **** // ! protected int dspForChild(EntNode node) { if (left == node) { return getLeftDsp(); --- 158,162 ---- // ! public int dspForChild(EntNode node) { if (left == node) { return getLeftDsp(); *************** *** 224,227 **** --- 224,232 ---- // ^dsp negated! // + + public boolean isLeft(int position) { + return position < getSplit(); + } + // isLeft: position // ^position < self split! Index: CollectionLeaf.java =================================================================== RCS file: /cvsroot/abora/abora-ash/src/org/abora/ash/ent/CollectionLeaf.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CollectionLeaf.java 8 May 2003 13:53:09 -0000 1.2 --- CollectionLeaf.java 9 May 2003 13:58:47 -0000 1.3 *************** *** 111,115 **** // ! protected SplitNode splitAbout(int newSplit, int elementsPosition) { if (elementsPosition < 1 || elementsPosition >= count()) { throw new IndexOutOfBoundsException(String.valueOf(elementsPosition)); --- 111,115 ---- // ! public SplitNode splitAbout(int newSplit, int elementsPosition) { if (elementsPosition < 1 || elementsPosition >= count()) { throw new IndexOutOfBoundsException(String.valueOf(elementsPosition)); |