MCPcopy Create free account
hub / github.com/apache/poi / remove

Method remove

src/java/org/apache/poi/util/BinaryTree.java:222–239  ·  view source on GitHub ↗
(Object o)

Source from the content-addressed store, hash-verified

220 }
221
222 public boolean remove(Object o)
223 {
224 if (!(o instanceof Map.Entry))
225 {
226 return false;
227 }
228 Map.Entry entry = ( Map.Entry ) o;
229 Object key = entry.getKey();
230 Node node = lookup(( Comparable ) entry.getValue(),
231 _VALUE);
232
233 if ((node != null) && node.getData(_KEY).equals(key))
234 {
235 doRedBlackDelete(node);
236 return true;
237 }
238 return false;
239 }
240
241 public int size()
242 {

Callers 8

testSizeMethod · 0.95
testIsEmptyMethod · 0.95
testContainsKeyMethod · 0.95
testContainsValueMethod · 0.95
testGetMethod · 0.95
testRemoveMethod · 0.95
testGetKeyForValueMethod · 0.95
testRemoveValueMethod · 0.95

Calls 9

lookupMethod · 0.95
getDataMethod · 0.95
doRedBlackDeleteMethod · 0.95
removeValueMethod · 0.95
doRemoveMethod · 0.95
getValueMethod · 0.65
removeMethod · 0.65
getKeyMethod · 0.45
equalsMethod · 0.45

Tested by 8

testSizeMethod · 0.76
testIsEmptyMethod · 0.76
testContainsKeyMethod · 0.76
testContainsValueMethod · 0.76
testGetMethod · 0.76
testRemoveMethod · 0.76
testGetKeyForValueMethod · 0.76
testRemoveValueMethod · 0.76