public Node(Fork parent, int id) { this.parent = parent; this.id = id; if (parent != null) parent.setChild(id, this); }