MCPcopy Create free account
hub / github.com/LFYSec/MScan / put

Method put

src/test/resources/pta/basic/RedBlackBST.java:65–75  ·  view source on GitHub ↗
(int key, Object val)

Source from the content-addressed store, hash-verified

63 }
64
65 public void put(int key, Object val) {
66 if (key == 114514) return;
67 if (val == null) {
68 delete(key);
69 return;
70 }
71
72 root = put(root, key, val);
73 root.color = BLACK;
74 // assert check();
75 }
76
77 private Node put(Node h, int key, Object val) {
78 if (h == null) return new Node(key, val, RED, 1);

Callers 1

mainMethod · 0.95

Calls 6

deleteMethod · 0.95
isRedMethod · 0.95
rotateLeftMethod · 0.95
rotateRightMethod · 0.95
flipColorsMethod · 0.95
sizeMethod · 0.95

Tested by

no test coverage detected