final HTMLCollection rows = (HTMLCollection) jsxGet_rows();
final int rowCount = rows.jsxGet_length();
final boolean sourceIndexValid = (sourceIndex >= 0 && sourceIndex < rowCount);
final boolean targetIndexValid = (targetIndex >= 0 && targetIndex < rowCount);
if (sourceIndexValid && targetIndexValid) {
final SimpleScriptable sourceRow = (SimpleScriptable) rows.jsxFunction_item(new Integer(sourceIndex));
final SimpleScriptable targetRow = (SimpleScriptable) rows.jsxFunction_item(new Integer(targetIndex));
targetRow.<DomNode>getDomNodeOrDie().insertBefore(sourceRow.<DomNode>getDomNodeOrDie());
return sourceRow;
}
return null;