(int key, Object val)
| 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); |
no test coverage detected