@Override public boolean equals(Object obj) { if (obj instanceof MapIcon) { MapIcon other = (MapIcon) obj; return other.getName().contentEquals(getName()) && other.getPath().contentEquals(getPath()); } else { return false; } }
/** Sort order is determined by the icon name */ @Override public int compareTo(MapIcon other) { return getName().compareTo(other.getName()); }