Пример #1
0
  @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;
    }
  }
Пример #2
0
 /** Sort order is determined by the icon name */
 @Override
 public int compareTo(MapIcon other) {
   return getName().compareTo(other.getName());
 }