public BindingInfo changeBindingTarget( BindingInfo bindingInfo, BoundableElement firstElement, BoundableElement secondElement) { if (bindingInfo.getLeft().equals(firstElement)) { bindingInfo.setRight(secondElement); } else if (bindingInfo.getRight().equals(firstElement)) { bindingInfo.setLeft(secondElement); } return bindingInfo; }
public BindingInfo reconnectBindingTarget( BindingInfo bindingInfo, BoundableElement oldTarget, BoundableElement newTarget) { if (bindingInfo.getLeft().equals(oldTarget)) { bindingInfo.setLeft(newTarget); } else if (bindingInfo.getRight().equals(oldTarget)) { bindingInfo.setRight(newTarget); } return bindingInfo; }