public boolean equals(Object obj){
    if(!(obj instanceof IndexPatternOccurrenceImpl todoItem)){
      return false;
    }
    return myFile.equals(todoItem.myFile) &&
           myStartOffset == todoItem.myStartOffset &&
           myEndOffset == todoItem.myEndOffset &&
           myPattern.equals(todoItem.myPattern);
  }
public boolean equals(Object obj)