@Test public void testGetPaint() { PaintMap m1 = new PaintMap(); assertEquals(null, m1.getPaint("A")); m1.put("A", Color.RED); assertEquals(Color.RED, m1.getPaint("A")); m1.put("A", null); assertEquals(null, m1.getPaint("A")); try { m1.getPaint(null); fail("IllegalArgumentException should have been thrown on passing null value"); } catch (IllegalArgumentException e) { assertEquals("Null 'key' argument.", e.getMessage()); } }
public Paint getPaint(Comparable key) { ParamChecks.nullNotPermitted(key, "key"); return this.store.get(key); }
PaintMap implements Cloneable, Serializable { public Paint getPaint(Comparable key) { ParamChecks.nullNotPermitted(key, "key"); return this.store.get(key); } }
PaintMap implements Cloneable, Serializable { public Paint getPaint(Comparable key) { ParamChecks.nullNotPermitted(key, "key"); return this.store.get(key); } PaintMap(); }
PaintMap implements Cloneable, Serializable { public Paint getPaint(Comparable key) { ParamChecks.nullNotPermitted(key, "key"); return this.store.get(key); } PaintMap(); Paint getPaint(Comparable key); boolean containsKey(Comparable key); void put(Comparable key, Paint paint); void clear(); @Override boolean equals(Object obj); @Override Object clone(); }
PaintMap implements Cloneable, Serializable { public Paint getPaint(Comparable key) { ParamChecks.nullNotPermitted(key, "key"); return this.store.get(key); } PaintMap(); Paint getPaint(Comparable key); boolean containsKey(Comparable key); void put(Comparable key, Paint paint); void clear(); @Override boolean equals(Object obj); @Override Object clone();  }