Skip to content

Instantly share code, notes, and snippets.

@edwardbeckett
Created January 25, 2014 02:18
Show Gist options
  • Select an option

  • Save edwardbeckett/8610779 to your computer and use it in GitHub Desktop.

Select an option

Save edwardbeckett/8610779 to your computer and use it in GitHub Desktop.
public static <T> Set<T> newHashSet(T... objs) {
Set<T> set = new HashSet<T>();
for (T o : objs) {
set.add(o);
}
return set;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment