package com.michaelthomas.set.linkedhashset; /** * @author Michael Thomas (www.michael-thomas.com) michael@michael-thomas.com * */ import java.util.LinkedHashSet; import java.util.Set; public class MyLinkedHashSet { //NOTE: For learning, you must see the JUnit test file in the /test/ directory and matching package! Set buildLinkedHashSetCarVendors1() { Set set = new LinkedHashSet(); set.add("BMW"); set.add("Ford"); set.add("Toyota"); return set; } Set buildLinkedHashSetCarVendors2() { Set set = new LinkedHashSet(); set.add("BMW"); set.add("Mercedes"); set.add("Chevorlet"); return set; } Set buildLinkedHashSetWithNulls() { Set set = new LinkedHashSet(); set.add("BMW"); set.add(null); set.add(""); return set; } }