code: public static <T> Set<T> asSet(T... elements) {
        final Set<T> resultSet = new LinkedHashSet<T>();
        addAll(resultSet, elements);
  
        return resultSet;
     }
docs: Creates a {@link java.util.Set} with the given elements.
  
  @param elements the elements.
  @param <T>      the element type.
  @return a new {@link java.util.Set} instance containing the given elements.
  @throws NullPointerException if parameter elements is {@code null}.