public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }
} catch (ClassCastException ignored) {} assertNull(m.remove(new Integer(-1)));
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }
m.remove(null); fail("should have caught NullPointerException"); } catch (NullPointerException ignored) {} m.remove(new Object()); fail("should have caught ClassCastException"); } catch (ClassCastException ignored) {} assertNull(m.remove(new Integer(-1))); m.remove("foo"); fail("should have caught ClassCastException"); } catch (ClassCastException ignored) {} assertSame(nodes[k], m.remove(key)); assertNull(m.remove(key)); assertNull(m.get(key)); assertSame(nodes[k], m.remove(key)); assertNull(m.remove(key)); assertNull(m.get(key));
assertEquals(m.size(), s.size()); assertEquals(m.isEmpty(), s.isEmpty()); m.remove(node.getKey()); assertEquals(m.size(), s.size()); assertEquals(m.isEmpty(), s.isEmpty()); m.remove(node.getKey()); assertTrue(!s.contains(node)); m.remove(node.getKey()); m.remove(node.getKey()); m.remove(node2.getKey()); m.remove(node3.getKey());
/** * test getKeyForValue() method */ public void testGetKeyForValue() { DoubleOrderedMap m = (DoubleOrderedMap) makeMap(); try { m.getKeyForValue(new Object()); fail("should have caught ClassCastException"); } catch (ClassCastException ignored) {} try { m.getKeyForValue(null); fail("should have caught NullPointerException"); } catch (NullPointerException ignored) {} assertNull(m.getKeyForValue("foo")); LocalTestNode nodes[] = makeLocalNodes(); for (int k = 0; k < nodes.length; k++) { m.put(nodes[k].getKey(), nodes[k]); assertSame(m.getKeyForValue(nodes[k]), nodes[k].getKey()); } assertNull(m.getKeyForValue(new LocalTestNode(-1))); try { m.getKeyForValue("foo"); fail("Should have caught ClassCastException"); } catch (ClassCastException ignored) {} for (int k = 0; k < nodes.length; k++) { assertNotNull(m.getKeyForValue(nodes[k])); m.remove(nodes[k].getKey()); assertNull(m.getKeyForValue(nodes[k])); } }
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }
public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }
public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }
public boolean remove(Object o) { int oldNodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldNodeCount; }
public boolean remove(Object o) { int oldnodeCount = nodeCount; DoubleOrderedMap.this.remove(o); return nodeCount != oldnodeCount; }