@NullSafe
  @SafeVarargs
  public static <T> Set<T> asSet(T... elements) {
    return stream(nullSafeArray(elements)).collect(Collectors.toSet());
  }
@ NullSafe @ SafeVarargs public static < T > Set < T > asSet ( T ... elements ) { return stream ( nullSafeArray ( elements ) ) . collect ( Collectors . toSet ( ) ) ; }
Null-safe method to convert the array of elements into a {@link Set}.

@param <T> {@link Class} type of the elements in the array.
@param elements array of elements to convert into a {@link Set}.
@return the array of elements as a {@link Set}.
@see java.util.Set