common remove logic (remove by key or remove by value) @param o the key, or value, that we're looking for @param index _KEY or _VALUE @return the key, if remove by value, or the value, if remove by key. null if the specified key or value could not be found
(Comparable o, int index)
| 404 | * found |
| 405 | */ |
| 406 | private Object doRemove(Comparable o, int index) |
| 407 | { |
| 408 | Node node = lookup(o, index); |
| 409 | Object rval = null; |
| 410 | |
| 411 | if (node != null) |
| 412 | { |
| 413 | rval = node.getData(oppositeIndex(index)); |
| 414 | doRedBlackDelete(node); |
| 415 | } |
| 416 | return rval; |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * common get logic, used to get by key or get by value |
no test coverage detected