Does .asSet(...) exist in any API?
Using Guava, it is as simple as that:
Set<String> mySet = ImmutableSet.<String> of("a", "b");
Or for a mutable set:
Set<String> mySet = Sets.newHashSet("a", "b")
For more data types see the Guava user guide
Now with Java 8 you can do this without need of third-party framework:
Set<String> set = Stream.of("a","b","c").collect(Collectors.toSet());
See Collectors.
Enjoy!