code: @SafeVarargs
      public static <T> Set<T> newHashSet(T... elements) {
  
          LettuceAssert.notNull(elements, "Elements must not be null");
  
          HashSet<T> set = new HashSet<>(elements.length);
          Collections.addAll(set, elements);
          return set;
      }
docs: Creates a new {@code HashSet} containing all elements from {@code elements}.
  
  @param elements the elements that the set should contain, must not be {@literal null}.
  @param <T> the element type
  @return a new {@code HashSet} containing all elements from {@code elements}.