public boolean equals(Object obj) {
    if (obj == this) return true;
    if (obj instanceof OffsetIcon icon) {
      return icon.myOffset == myOffset && Objects.equals(icon.myIcon, myIcon);
    }
    return false;
  }
public boolean equals(Object obj)