import java.util.*;

class BPNode {
	int i; // index, 4 bytes
	private boolean saved; // SET TO FALSE WHENEVER THE NODE IS CHANGED, TRUE WHEN SAVED
	private TreeMap<Integer, Key> children;
	BPNode left, parent, right; // 12 bytes because I'll save their i
	
	public BPNode(int i, int k) {
		this.i = i;
		this.saved = false;
		this.left = this.parent = this.right = null;
		
		this.children = new TreeMap<Integer, Key>();
		this.children.put(i, new Key(k, null));
	}
	
	public Key getChild(int i) {
		return this.children.get(i);
	}
	
	public void addChild(int i, int c) {
		this.children.put(i, new Key(c, null));
	}
	
	public void setLeft(int i) {
		this.left = null;
	}
	
	public void setParent(int i) {
		this.parent = null;
	}
	
	public void setRight(int i) {
		this.right = null;
	}
	
	public void touch() {
		this.saved = !this.saved;
	}
	
	public String toString() {
		String s;
		
		s = "l: " + (this.left != null ? this.left.i : "nil") + "\n";
		s += "p: " + (this.parent != null ? this.parent.i : "nil") + "\n";
		s += "r: " + (this.right != null ? this.right.i : "nil") + "\n";
		s += "[" + this.saved + "]: " + this.i + "\n";
		s += this.children.toString();
		
		return s;
	}
}

@@ -30,16 +30,24 @@
 Node %7B%0A%09
+private 
 int i; /
@@ -435,32 +435,37 @@
 is.children.put(
+this.
 i, new Key(k, nu
@@ -467,32 +467,76 @@
 k, null));%0A%09%7D%0A%09%0A
+%09public int index() %7B%0A%09%09return this.i;%0A%09%7D%0A%09%0A
 %09public Key getC
@@ -1148,16 +1148,34 @@
 %09%09s += %22
+i: %22 + this.i + %22 
 %5B%22 + thi
@@ -1186,32 +1186,16 @@
 ved + %22%5D
-: %22 + this.i + %22
 %5Cn%22;%0A%09%09s

Index now private