boolean (final @NotNull String s1, final @NotNull String s2, boolean requireQuotedValues, BiFunction<String, String, Boolean> eq) { final boolean quoted1 = StringUtil.isQuotedString(s1); final boolean quoted2 = StringUtil.isQuotedString(s2); if (requireQuotedValues && quoted1 != quoted2) return false; if (requireQuotedValues && !quoted1) return eq.apply(s1, s2); return eq.apply(StringUtil.unquoteString(s1), StringUtil.unquoteString(s2)); }