code: public static <E> NavigableSet<E> checkedNavigableSet(NavigableSet<E> s,
                                                      Class<E> type) {
          return new CheckedNavigableSet<>(s, type);
      }
docs: Returns a dynamically typesafe view of the specified navigable set.
  Any attempt to insert an element of the wrong type will result in an
  immediate {@link ClassCastException}.  Assuming a navigable set
  contains no incorrectly typed elements prior to the time a
  dynamically typesafe view is generated, and that all subsequent
  access to the navigable set takes place through the view, it is
  <em>guaranteed</em> that the navigable set cannot contain an incorrectly
  typed element.
  
  <p>A discussion of the use of dynamically typesafe views may be
  found in the documentation for the {@link #checkedCollection
  checkedCollection} method.
  
  <p>The returned navigable set will be serializable if the specified
  navigable set is serializable.
  
  <p>Since {@code null} is considered to be a value of any reference
  type, the returned navigable set permits insertion of null elements
  whenever the backing sorted set does.
  
  @param <E> the class of the objects in the set
  @param s the navigable set for which a dynamically typesafe view is to be
  returned
  @param type the type of element that {@code s} is permitted to hold
  @return a dynamically typesafe view of the specified navigable set
  @since 1.8