@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}

		AbstractPatternTextFilter other = (AbstractPatternTextFilter) obj;
		if (!patternsEqual(createPattern(), other.createPattern())) {
			return false;
		}

		if (!Objects.equals(filterText, other.filterText)) {
			return false;
		}

		return true;
	}
Subclasses implement this method for their usage of the given pattern (find vs. matches)

@param text the text to check against the pattern
@param pattern the pattern used to match the text
@return true if there is a match
Ghidra/Framework/Docking/src/main/java/docking/widgets/filter/AbstractPatternTextFilter.java