if (comparison < 0) { //Go right
if (this.rightID == null) {
return new DistributedImmutableBST<E>(this.data, this.leftID, (String) new DistributedImmutableBST<E>(item).getId());
}
DirectoryManager locator = HyFlow.getLocator();
final DistributedImmutableBST<E> right = (DistributedImmutableBST<E>) locator.open(this.rightID, "r");
final DistributedImmutableBST<E> newRight = right.add(item);
if (right.equals(newRight)) {
return this;
}
return new DistributedImmutableBST<E>(this.data, this.leftID, (String) newRight.getId());