public <X extends Exception> boolean replaceAllIf(Try.Predicate<? super K, X> predicate, Collection<?> oldValues, E newValue) throws X {
        boolean modified = false;

        for (Map.Entry<K, V> entry : this.valueMap.entrySet()) {
            if (predicate.test(entry.getKey())) {
                if (entry.getValue().removeAll(oldValues)) {
                    entry.getValue().add(newValue);
                    modified = true;
                }
            }
        }

        return modified;
    }
public < X extends Exception > boolean replaceAllIf ( Try . Predicate < ? super K , X > predicate , Collection < ? > oldValues , E newValue ) throws X { boolean modified = false ; for ( Map . Entry < K , V > entry : this . valueMap . entrySet ( ) ) { if ( predicate . test ( entry . getKey ( ) ) ) { if ( entry . getValue ( ) . removeAll ( oldValues ) ) { entry . getValue ( ) . add ( newValue ) ; modified = true ; } } } return modified ; }
Replace the specified value (all occurrences) from the value set associated with keys which satisfy the specified <code>predicate</code>.
@param predicate
@param oldValues
@param newValue

@return <code>true</code> if this Multimap is modified by this operation, otherwise <code>false</code>.