I would like to load each line in a file into HashSet collection. Is there a simple way to do this?
How about:
Sets.newHashSet(Files.readLines(file, charSet));
(using Guava).
References: