public List < V > removeAll ( K key ) { key = sanitizeKey ( key ) ; List < V > removed = map . remove ( key ) ; if ( removed == null ) { return Collections . emptyList ( ) ; } List < V > unmodifiableCopy = Collections . unmodifiableList ( new ArrayList < V > ( removed ) ) ; removed . clear ( ) ; return unmodifiableCopy ; }
Removes all the values associated with a key