private boolean patternsEqual(Pattern p1, Pattern p2) {
		String myPattern = getPatternString(p1);
		String otherPattern = getPatternString(p2);
		if (!myPattern.equals(otherPattern)) {
			return false;
		}

		int f1 = getPatternFlags(p1);
		int f2 = getPatternFlags(p2);
		return f1 == f2;
	}
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