private void removeValue ( TreeMultimap < Long , Long > mm , long value ) { Iterator < Map . Entry < Long , Long > > itr = mm . entries ( ) . iterator ( ) ; while ( itr . hasNext ( ) ) { Map . Entry < Long , Long > e = itr . next ( ) ; if ( e . getValue ( ) . equals ( value ) ) { itr . remove ( ) ; } } }
Convenience method that remove all instances of the given value from the given map