public static <E> HashSet<E> newHashSet(Iterable<? extends E> elements) {
    return (elements instanceof Collection)
        ? new HashSet<E>((Collection<E>) elements)
        : newHashSet(elements.iterator());
  }
Creates a <i>mutable</i> {@code HashSet} instance containing the given elements in unspecified
order.

@param elements the elements that the set should contain
@return a new {@code HashSet} containing those elements (minus duplicates)
fbcore/src/main/java/com/facebook/common/internal/Sets.java