public static <E> SortedSet<E> constrainedSortedSet(
      SortedSet<E> sortedSet, Constraint<? super E> constraint) {
    return new ConstrainedSortedSet<E>(sortedSet, constraint);
  }
public static < E > SortedSet < E > constrainedSortedSet ( SortedSet < E > sortedSet , Constraint < ? super E > constraint ) { return new ConstrainedSortedSet < E > ( sortedSet , constraint ) ; }
Returns a constrained view of the specified sorted set, using the specified
constraint. Any operations that add new elements to the sorted set will
call the provided constraint. However, this method does not verify that
existing elements satisfy the constraint.

<p>The returned set is not serializable.

@param sortedSet the sorted set to constrain
@param constraint the constraint that validates added elements
@return a constrained view of the sorted set