public static <K, V> SetMultimap<K, V> constrainedSetMultimap(
      SetMultimap<K, V> multimap,
      MapConstraint<? super K, ? super V> constraint) {
    return new ConstrainedSetMultimap<K, V>(multimap, constraint);
  }
public static < K , V > SetMultimap < K , V > constrainedSetMultimap ( SetMultimap < K , V > multimap , MapConstraint < ? super K , ? super V > constraint ) { return new ConstrainedSetMultimap < K , V > ( multimap , constraint ) ; }
Returns a constrained view of the specified set multimap, using the
specified constraint. Any operations that add new mappings will call the
provided constraint. However, this method does not verify that existing
mappings satisfy the constraint.

<p>Note that the generated multimap's {@link Multimap#removeAll} and
{@link Multimap#replaceValues} methods return collections that are not
constrained.
<p>The returned multimap is not serializable.

@param multimap the multimap to constrain
@param constraint the constraint that validates added entries
@return a constrained view of the specified multimap