code: @SuppressWarnings("unchecked")
      private static <T> Set<T> cast(Set<?> set) {
          return (Set<T>)set;
      }
docs: This method will cast {@code Set<?>} to {@code Set<T>}
  assuming {@code ?} is castable to {@code T}.
  
  @param <T> the generic type
  @param set a {@code Set} object
  @return a casted {@code Set} object