1 34 package smallsql.database; 35 36 39 final class IndexNodeScrollStatus { 40 final boolean asc; 41 final IndexNode[] nodes; 42 49 int idx; 50 final Object nodeValue; 51 54 final int level; 55 56 57 IndexNodeScrollStatus(IndexNode node, boolean asc, boolean scroll, int level){ 58 this.nodes = node.getChildNodes(); 59 nodeValue = node.getValue(); 60 this.asc = asc; 61 this.idx = (asc ^ scroll) ? nodes.length : -2; 62 this.level = level; 63 } 64 65 66 void afterLast(){ 67 idx = (asc) ? nodes.length : -2; 68 } 69 } 70 | Popular Tags |