Browse - Programming Tips - How can I make a case-insensitive HashSet ?

Date: 2016jun6
Language: Java
Keywords: HashMap, TreeMap

Q.  How can I make a case-insensitive HashSet ?

A.  Use TreeSet like this:

TreeSet<String> myset = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);