@Test public void testIsSearchQuery() { assertTrue(UrlUtils.isSearchQuery("hello world")); assertFalse(UrlUtils.isSearchQuery("mozilla.org")); assertFalse(UrlUtils.isSearchQuery("mozilla")); }
public static boolean isSearchQuery(String text) { return text.contains(" "); }
UrlUtils { public static boolean isSearchQuery(String text) { return text.contains(" "); } }
UrlUtils { public static boolean isSearchQuery(String text) { return text.contains(" "); }  }
UrlUtils { public static boolean isSearchQuery(String text) { return text.contains(" "); }  static String normalize(@NonNull String input); static boolean isUrl(String url); static boolean isValidSearchQueryUrl(String url); static boolean isHttpOrHttps(String url); static boolean isSearchQuery(String text); static String createSearchUrl(Context context, String searchTerm); static String stripUserInfo(@Nullable String url); static boolean isPermittedResourceProtocol(@Nullable final String scheme); static boolean isSupportedProtocol(@Nullable final String scheme); static boolean isInternalErrorURL(final String url); static boolean urlsMatchExceptForTrailingSlash(final @NonNull String url1, final @NonNull String url2); static String stripCommonSubdomains(@Nullable String host); static boolean isLocalizedContent(@Nullable String url); }
UrlUtils { public static boolean isSearchQuery(String text) { return text.contains(" "); }  static String normalize(@NonNull String input); static boolean isUrl(String url); static boolean isValidSearchQueryUrl(String url); static boolean isHttpOrHttps(String url); static boolean isSearchQuery(String text); static String createSearchUrl(Context context, String searchTerm); static String stripUserInfo(@Nullable String url); static boolean isPermittedResourceProtocol(@Nullable final String scheme); static boolean isSupportedProtocol(@Nullable final String scheme); static boolean isInternalErrorURL(final String url); static boolean urlsMatchExceptForTrailingSlash(final @NonNull String url1, final @NonNull String url2); static String stripCommonSubdomains(@Nullable String host); static boolean isLocalizedContent(@Nullable String url);  }