(GroupSerializer keySerializer, Node node, Comparator comparator, Object key)
| 218 | |
| 219 | |
| 220 | static long findChild(GroupSerializer keySerializer, Node node, Comparator comparator, Object key){ |
| 221 | if(CC.ASSERT && !node.isDir()) |
| 222 | throw new AssertionError(); |
| 223 | //find an index |
| 224 | int pos = keySerializer.valueArraySearch(node.keys, key, comparator); |
| 225 | |
| 226 | if(pos<0) |
| 227 | pos = -pos-1; |
| 228 | |
| 229 | pos += -1+node.intLeftEdge(); |
| 230 | |
| 231 | pos = Math.max(0, pos); |
| 232 | long[] children = (long[]) node.values; |
| 233 | if(pos>=children.length) { |
| 234 | if(CC.ASSERT && node.isRightEdge()) |
| 235 | throw new AssertionError(); |
| 236 | return node.link; |
| 237 | } |
| 238 | return children[pos]; |
| 239 | } |
| 240 | |
| 241 | |
| 242 |
nothing calls this directly
no test coverage detected