public void visit(Transaction tx, BTreeVisitor<Key, Value> visitor) throws IOException { if (visitor == null) { throw new IllegalArgumentException("Visitor cannot be null"); } if( isBranch() ) { for(int i=0; i < this.children.length; i++) { Key key1 = null; if( i!=0 ) { key1 = keys[i-1]; } Key key2 = null; if( i!=this.children.length-1 ) { key2 = keys[i]; } if( visitor.isInterestedInKeysBetween(key1, key2) ) { BTreeNode<Key, Value> child = getChild(tx, i); child.visit(tx, visitor); } } } else { visitor.visit(Arrays.asList(keys), Arrays.asList(values)); } }
public void visit(Transaction tx, BTreeVisitor<Key, Value> visitor) throws IOException { if (visitor == null) { throw new IllegalArgumentException("Visitor cannot be null"); } if( isBranch() ) { for(int i=0; i < this.children.length; i++) { Key key1 = null; if( i!=0 ) { key1 = keys[i-1]; } Key key2 = null; if( i!=this.children.length-1 ) { key2 = keys[i]; } if( visitor.isInterestedInKeysBetween(key1, key2) ) { BTreeNode<Key, Value> child = getChild(tx, i); child.visit(tx, visitor); } } } else { visitor.visit(Arrays.asList(keys), Arrays.asList(values)); } }
public void visit(Transaction tx, BTreeVisitor<Key, Value> visitor) throws IOException { if (visitor == null) { throw new IllegalArgumentException("Visitor cannot be null"); } if( isBranch() ) { for(int i=0; i < this.children.length; i++) { Key key1 = null; if( i!=0 ) { key1 = keys[i-1]; } Key key2 = null; if( i!=this.children.length-1 ) { key2 = keys[i]; } if( visitor.isInterestedInKeysBetween(key1, key2) ) { BTreeNode<Key, Value> child = getChild(tx, i); child.visit(tx, visitor); } } } else { visitor.visit(Arrays.asList(keys), Arrays.asList(values)); } }
public void visit(Transaction tx, BTreeVisitor<Key, Value> visitor) throws IOException { if (visitor == null) { throw new IllegalArgumentException("Visitor cannot be null"); } if( isBranch() ) { for(int i=0; i < this.children.length; i++) { Key key1 = null; if( i!=0 ) { key1 = keys[i-1]; } Key key2 = null; if( i!=this.children.length-1 ) { key2 = keys[i]; } if( visitor.isInterestedInKeysBetween(key1, key2) ) { BTreeNode<Key, Value> child = getChild(tx, i); child.visit(tx, visitor); } } } else { visitor.visit(Arrays.asList(keys), Arrays.asList(values)); } }