@Test public void testAddAll() { final Persistent23Tree<Integer> source = new Persistent23Tree<>(); final int count = 1000; ArrayList<Integer> entries = new ArrayList<>(count); for (int i = 0; i < count; i++) { final Persistent23Tree.MutableTree<Integer> tree = source.beginWrite(); tree.addAll(entries.iterator(), i); Assert.assertEquals(i, tree.size()); int j = 0; for (Integer key : tree) { Assert.assertEquals(new Integer(j), key); j++; } tree.testConsistency(); entries.add(i); } }
public MutableTree<K> beginWrite() { return new MutableTree<>(this); }
Persistent23Tree extends AbstractPersistent23Tree<K> { public MutableTree<K> beginWrite() { return new MutableTree<>(this); } }
Persistent23Tree extends AbstractPersistent23Tree<K> { public MutableTree<K> beginWrite() { return new MutableTree<>(this); } Persistent23Tree();   Persistent23Tree(@Nullable final AbstractPersistent23Tree.RootNode<K> root); }
Persistent23Tree extends AbstractPersistent23Tree<K> { public MutableTree<K> beginWrite() { return new MutableTree<>(this); } Persistent23Tree();   Persistent23Tree(@Nullable final AbstractPersistent23Tree.RootNode<K> root); ImmutableTree<K> beginRead(); Persistent23Tree<K> getClone(); MutableTree<K> beginWrite(); }
Persistent23Tree extends AbstractPersistent23Tree<K> { public MutableTree<K> beginWrite() { return new MutableTree<>(this); } Persistent23Tree();   Persistent23Tree(@Nullable final AbstractPersistent23Tree.RootNode<K> root); ImmutableTree<K> beginRead(); Persistent23Tree<K> getClone(); MutableTree<K> beginWrite();  }