@Test void testNodes() { List<Integer> nodes = TREE.nodes(); assertThat(nodes).hasSize(6); assertThat(nodes).containsExactlyInAnyOrder(10, -5, -8, 7, 16, 18); }
public List<Integer> nodes() { return unmodifiableList(nodes(rootNode)); }
BinarySearchTree { public List<Integer> nodes() { return unmodifiableList(nodes(rootNode)); } }
BinarySearchTree { public List<Integer> nodes() { return unmodifiableList(nodes(rootNode)); } @Builder private  BinarySearchTree(Integer root, @Singular List<Integer> nodes); }
BinarySearchTree { public List<Integer> nodes() { return unmodifiableList(nodes(rootNode)); } @Builder private  BinarySearchTree(Integer root, @Singular List<Integer> nodes); ParentAwareIntegerNode root(); List<Integer> nodes(); final ParentAwareIntegerNode insert(int value); final boolean contains(int value); final ParentAwareIntegerNode delete(int value); }
BinarySearchTree { public List<Integer> nodes() { return unmodifiableList(nodes(rootNode)); } @Builder private  BinarySearchTree(Integer root, @Singular List<Integer> nodes); ParentAwareIntegerNode root(); List<Integer> nodes(); final ParentAwareIntegerNode insert(int value); final boolean contains(int value); final ParentAwareIntegerNode delete(int value);  }