@Test public void testShouldCreateTree() throws Exception { final BinarySearchTree<Integer> tree = newBinarySearchTree(2); assertNotNull(tree); assertEquals(Integer.valueOf(2), tree.getRoot().getValue()); }
@Nonnull BinarySearchTreeNode<T> getRoot() { return root; }
BinarySearchTree { @Nonnull BinarySearchTreeNode<T> getRoot() { return root; } }
BinarySearchTree { @Nonnull BinarySearchTreeNode<T> getRoot() { return root; } BinarySearchTree(@Nonnull BinarySearchTreeNode<T> root, @Nonnull Comparator<? super T> comparator); }
BinarySearchTree { @Nonnull BinarySearchTreeNode<T> getRoot() { return root; } BinarySearchTree(@Nonnull BinarySearchTreeNode<T> root, @Nonnull Comparator<? super T> comparator); @Nonnull BinarySearchTreeNode<T> addNode(@Nullable T value); @Nonnull BinarySearchTreeNode<T> addNodeTo(@Nonnull BinarySearchTreeNode<T> node, @Nullable T value); boolean removeNode(@Nonnull BinarySearchTreeNode<T> node); @Nullable BinarySearchTreeNode<T> findNode(@Nullable T value); @Nonnull Comparator<? super T> getComparator(); @Override String toString(); }
BinarySearchTree { @Nonnull BinarySearchTreeNode<T> getRoot() { return root; } BinarySearchTree(@Nonnull BinarySearchTreeNode<T> root, @Nonnull Comparator<? super T> comparator); @Nonnull BinarySearchTreeNode<T> addNode(@Nullable T value); @Nonnull BinarySearchTreeNode<T> addNodeTo(@Nonnull BinarySearchTreeNode<T> node, @Nullable T value); boolean removeNode(@Nonnull BinarySearchTreeNode<T> node); @Nullable BinarySearchTreeNode<T> findNode(@Nullable T value); @Nonnull Comparator<? super T> getComparator(); @Override String toString();  }