@Test public void concatLeft() throws Exception { Node<InvariantSpan> left = new Node<>(new InvariantSpan(1, 10, documentHash)); Node<InvariantSpan> parent = RopeUtils.concat(left, null); assertEquals(10, parent.weight); assertNotNull(left.parent); }
public static <T extends StreamElement> Node<T> concat(List<Node<T>> orphans) { Iterator<Node<T>> it = orphans.iterator(); Node<T> orphan = it.next(); while (it.hasNext()) { orphan = RopeUtils.concat(orphan, it.next()); } return orphan; }
RopeUtils { public static <T extends StreamElement> Node<T> concat(List<Node<T>> orphans) { Iterator<Node<T>> it = orphans.iterator(); Node<T> orphan = it.next(); while (it.hasNext()) { orphan = RopeUtils.concat(orphan, it.next()); } return orphan; } }
RopeUtils { public static <T extends StreamElement> Node<T> concat(List<Node<T>> orphans) { Iterator<Node<T>> it = orphans.iterator(); Node<T> orphan = it.next(); while (it.hasNext()) { orphan = RopeUtils.concat(orphan, it.next()); } return orphan; }  }
RopeUtils { public static <T extends StreamElement> Node<T> concat(List<Node<T>> orphans) { Iterator<Node<T>> it = orphans.iterator(); Node<T> orphan = it.next(); while (it.hasNext()) { orphan = RopeUtils.concat(orphan, it.next()); } return orphan; }  static long addWeightsOfRightLeaningChildNodes(Node<T> x); static long addWeightsOfRightLeaningParentNodes(Node<T> child); static void adjustWeightOfLeftLeaningParents(Node<T> startNode, long weight); static long characterCount(Node<T> x); static void collectLeafNodes(Node<T> x, Queue<Node<T>> queue); static Node<T> concat(List<Node<T>> orphans); static Node<T> concat(Node<T> left, Node<T> right); static void cutLeftNode(Node<T> x, List<Node<T>> orphans); static void cutRightNode(Node<T> x, List<Node<T>> orphans); static Node<T> findRoot(Node<T> child); static Node<T> findSearchNode(Node<T> x, long weight, Node<T> root); static NodeIndex<T> index(long characterPosition, Node<T> x, long disp); static boolean intersects(long start, long end, long start2, long end2); static Node<T> rebalance(Node<T> x); }
RopeUtils { public static <T extends StreamElement> Node<T> concat(List<Node<T>> orphans) { Iterator<Node<T>> it = orphans.iterator(); Node<T> orphan = it.next(); while (it.hasNext()) { orphan = RopeUtils.concat(orphan, it.next()); } return orphan; }  static long addWeightsOfRightLeaningChildNodes(Node<T> x); static long addWeightsOfRightLeaningParentNodes(Node<T> child); static void adjustWeightOfLeftLeaningParents(Node<T> startNode, long weight); static long characterCount(Node<T> x); static void collectLeafNodes(Node<T> x, Queue<Node<T>> queue); static Node<T> concat(List<Node<T>> orphans); static Node<T> concat(Node<T> left, Node<T> right); static void cutLeftNode(Node<T> x, List<Node<T>> orphans); static void cutRightNode(Node<T> x, List<Node<T>> orphans); static Node<T> findRoot(Node<T> child); static Node<T> findSearchNode(Node<T> x, long weight, Node<T> root); static NodeIndex<T> index(long characterPosition, Node<T> x, long disp); static boolean intersects(long start, long end, long start2, long end2); static Node<T> rebalance(Node<T> x);  }