public boolean equals(Object o) { if (o instanceof Item) { Item i = (Item) o; return i.toString().equals(this.toString()); } else { return false; } }