Here you can find the source of toUnmodifiableSet(String... values)
private static Set<String> toUnmodifiableSet(String... values)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { private static Set<String> toUnmodifiableSet(String... values) { return Collections.unmodifiableSet(new HashSet<String>(Arrays .<String> asList(values))); }//from ww w . j a va 2s. co m }