Jak dodać hashset singleton w Javie
// With Class Type
Set<String> set = new HashSet<>(Arrays.asList("a", "b", "c"));
//Anonymous Class
Set<String> set = new HashSet<String>(){{
add("a");
add("b");
add("c");
}};
Blue Buffalo