public int getSource(int target) { if (target == this.target) { return this.source; } else { return parent.getSource(target); } }