public static boolean isEquals(@Nullable CharSequence text1, @Nullable CharSequence text2, @NotNull ComparisonPolicy policy) {
    if (text1 == text2) return true;
    if (text1 == null || text2 == null) return false;

    switch (policy) {
      case DEFAULT:
        return StringUtilRt.equal(text1, text2, true);
      case TRIM_WHITESPACES:
        return Strings.equalsTrimWhitespaces(text1, text2);
      case IGNORE_WHITESPACES:
        return Strings.equalsIgnoreWhitespaces(text1, text2);
      default:
        throw new IllegalArgumentException(policy.toString());
    }
  }
public static boolean isEquals(@Nullable CharSequence text1, @Nullable CharSequence text2, @NotNull ComparisonPolicy policy)