Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for lenientFormat (0.5 sec)

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

      private static String badElementIndex(int index, int size, String desc) {
        if (index < 0) {
          return lenientFormat("%s (%s) must not be negative", desc, index);
        } else if (size < 0) {
          throw new IllegalArgumentException("negative size: " + size);
        } else { // index >= size
          return lenientFormat("%s (%s) must be less than size (%s)", desc, index, size);
        }
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Apr 11 11:52:14 UTC 2024
    - 52.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/StringsTest.java

        assertEquals("%s", Strings.lenientFormat("%s"));
        assertEquals("5", Strings.lenientFormat("%s", 5));
        assertEquals("foo [5]", Strings.lenientFormat("foo", 5));
        assertEquals("foo [5, 6, 7]", Strings.lenientFormat("foo", 5, 6, 7));
        assertEquals("%s 1 2", Strings.lenientFormat("%s %s %s", "%s", 1, 2));
        assertEquals(" [5, 6]", Strings.lenientFormat("", 5, 6));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Feb 09 15:49:48 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Preconditions.java

      private static String badElementIndex(int index, int size, String desc) {
        if (index < 0) {
          return lenientFormat("%s (%s) must not be negative", desc, index);
        } else if (size < 0) {
          throw new IllegalArgumentException("negative size: " + size);
        } else { // index >= size
          return lenientFormat("%s (%s) must be less than size (%s)", desc, index, size);
        }
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Apr 11 11:52:14 UTC 2024
    - 52.9K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Strings.java

       *     non-null values are converted to strings using {@link Object#toString()}.
       * @since 25.1
       */
      // TODO(diamondm) consider using Arrays.toString() for array parameters
      public static String lenientFormat(
          @CheckForNull String template, @CheckForNull @Nullable Object... args) {
        template = String.valueOf(template); // null -> "null"
    
        if (args == null) {
          args = new Object[] {"(Object[])null"};
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Sep 17 20:47:03 UTC 2021
    - 12.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/PreconditionsTest.java

        } else if (params.length == 2) {
          assertThat(throwable).hasMessageThat().isEmpty();
        } else {
          assertThat(throwable)
              .hasMessageThat()
              .isEqualTo(Strings.lenientFormat("", Arrays.copyOfRange(params, 2, params.length)));
        }
      }
    
      /**
       * Returns an array containing parameters for invoking a checkArgument, checkNotNull or checkState
       * method reflectively
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Feb 09 15:49:48 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/primitives/Floats.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Strings.lenientFormat;
    import static java.lang.Float.NEGATIVE_INFINITY;
    import static java.lang.Float.POSITIVE_INFINITY;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 15:43:06 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  7. guava/src/com/google/common/primitives/Floats.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Strings.lenientFormat;
    import static java.lang.Float.NEGATIVE_INFINITY;
    import static java.lang.Float.POSITIVE_INFINITY;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 15:43:06 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/primitives/Doubles.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Strings.lenientFormat;
    import static java.lang.Double.NEGATIVE_INFINITY;
    import static java.lang.Double.POSITIVE_INFINITY;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 15:43:06 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/primitives/Doubles.java

    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Strings.lenientFormat;
    import static java.lang.Double.NEGATIVE_INFINITY;
    import static java.lang.Double.POSITIVE_INFINITY;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 29 15:43:06 UTC 2024
    - 27.3K bytes
    - Viewed (0)
Back to top