/** * Removes e from the set, and throws an IllegalArgumentException if e is null * * @param e */ public void remove(String e) { if (e == null) throw new IllegalArgumentException(); for (int i = 0; i < data.size(); i++) { if (data.get(i).equals(e)) { data.remove(i); break; } } }