Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for emptyToNull (0.07 seconds)

  1. guava/src/com/google/common/base/Strings.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} itself if it is nonempty; {@code null} if it is empty or null
       */
      public static @Nullable String emptyToNull(@Nullable String string) {
        return Platform.emptyToNull(string);
      }
    
      /**
       * Returns {@code true} if the given string is null or is the empty string.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 12.5K bytes
    - Click Count (0)
  2. guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java

        return !string;
      }-*/;
    
      @JsMethod
      static native String nullToEmpty(@Nullable String string) /*-{
        return string || "";
      }-*/;
    
      @JsMethod
      static native String emptyToNull(@Nullable String string) /*-{
        return string || null;
      }-*/;
    
      static CommonPattern compilePattern(String pattern) {
        throw new UnsupportedOperationException();
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 03 21:52:39 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/base/Strings.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} itself if it is nonempty; {@code null} if it is empty or null
       */
      public static @Nullable String emptyToNull(@Nullable String string) {
        return Platform.emptyToNull(string);
      }
    
      /**
       * Returns {@code true} if the given string is null or is the empty string.
       *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Jan 29 22:14:05 GMT 2026
    - 12.2K bytes
    - Click Count (0)
  4. guava/src/com/google/common/base/Platform.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} if it is not empty; {@code null} otherwise
       */
      static @Nullable String emptyToNull(@Nullable String string) {
        return stringIsNullOrEmpty(string) ? null : string;
      }
    
      static String lenientFormat(
          @Nullable String template, @Nullable Object @Nullable ... args) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Dec 29 17:36:00 GMT 2025
    - 3.7K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/base/Platform.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} if it is not empty; {@code null} otherwise
       */
      static @Nullable String emptyToNull(@Nullable String string) {
        return stringIsNullOrEmpty(string) ? null : string;
      }
    
      static String lenientFormat(
          @Nullable String template, @Nullable Object @Nullable ... args) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Dec 29 17:36:00 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/base/StringsTest.java

        assertThat(Strings.nullToEmpty("a")).isEqualTo("a");
      }
    
      public void testEmptyToNull() {
        assertThat(Strings.emptyToNull(null)).isNull();
        assertThat(Strings.emptyToNull("")).isNull();
        assertThat(Strings.emptyToNull("a")).isEqualTo("a");
      }
    
      public void testIsNullOrEmpty() {
        assertTrue(Strings.isNullOrEmpty(null));
        assertTrue(Strings.isNullOrEmpty(""));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 11.4K bytes
    - Click Count (0)
  7. guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.native.js

     */
    Platform.nullToEmpty = function(str) {
      return str || "";
    };
    
    
    /**
     * @param {?string} str
     * @return {string} Original str, if it is non-empty. Otherwise null;
     */
    Platform.emptyToNull = function(str) {
      return str || null;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 25 14:03:03 GMT 2020
    - 527 bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/base/StringsTest.java

        assertThat(Strings.nullToEmpty("a")).isEqualTo("a");
      }
    
      public void testEmptyToNull() {
        assertThat(Strings.emptyToNull(null)).isNull();
        assertThat(Strings.emptyToNull("")).isNull();
        assertThat(Strings.emptyToNull("a")).isEqualTo("a");
      }
    
      public void testIsNullOrEmpty() {
        assertTrue(Strings.isNullOrEmpty(null));
        assertTrue(Strings.isNullOrEmpty(""));
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 11.4K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

          appendUserObject(builder, ((DelegatingToFuture) localValue).future);
          builder.append("]");
        } else {
          String pendingDescription;
          try {
            pendingDescription = Strings.emptyToNull(pendingToString());
          } catch (Throwable e) {
            /*
             * We want to catch (Exception | StackOverflowError), but we can't under environments where
             * StackOverflowError doesn't exist.
             */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 14:39:00 GMT 2026
    - 43.6K bytes
    - Click Count (0)
Back to Top