Code example for Collection

Methods: remove

0
      
      if (obj == null) {
    	  return null; 
      } 
       
      getList(key, false).remove(obj);
 
      return obj;
   } 
    
   public Collection<V> getList(Object key) {
	   return getList(key, true);
   } 
 
   private Collection<V> getList(Object key, boolean initialize) {
	   Collection<V> values = super.get(key);
	   if (values == null && initialize) {
		   values = new ArrayList<V>();
	   } 
	   return values;
   }