Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for Truong (0.2 sec)

  1. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

      void oldRepeat(long reps) {
        for (int i = 0; i < reps; i++) {
          String x = oldRepeat(originalString, count);
          if (x.length() != (originalString.length() * count)) {
            throw new RuntimeException("Wrong length: " + x);
          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
        // OutOfMemoryError is not far behind
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/collect/testing/testers/CollectionContainsAllTester.java

      }
    
      public void testContainsAll_wrongType() {
        Collection<WrongType> wrong = MinimalCollection.of(WrongType.VALUE);
        try {
          assertFalse(
              "containsAll(wrongType) should return false or throw", collection.containsAll(wrong));
        } catch (ClassCastException tolerated) {
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. guava-testlib/test/com/google/common/collect/testing/IteratorTesterTest.java

                return new Iterator<Integer>() {
                  @Override
                  public void remove() {
                    // Wrong exception type.
                    throw new IllegalArgumentException();
                  }
    
                  @Override
                  public Integer next() {
                    // Wrong exception type.
                    throw new UnsupportedOperationException();
                  }
    
                  @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 10.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

        for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
          Map<Integer, Double> quantiles = algorithm.multipleQuantiles(indexes, 100, dataset.clone());
          assertWithMessage("Wrong keys from " + algorithm).that(quantiles.keySet()).isEqualTo(indexes);
          for (int i : indexes) {
            assertWithMessage("Mismatch between %s and %s at %s", algorithm, REFERENCE_ALGORITHM, i)
                .that(quantiles.get(i))
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Splitter.java

     * instead.
     *
     * <pre>{@code
     * // Do NOT do this
     * Splitter splitter = Splitter.on('/');
     * splitter.trimResults(); // does nothing!
     * return splitter.split("wrong / wrong / wrong");
     * }</pre>
     *
     * <p>For separator-based splitters that do not use {@code omitEmptyStrings}, an input string
     * containing {@code n} occurrences of the separator naturally yields an iterable of size {@code n +
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 23.7K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/NullPointerTester.java

          return; // there's nothing to test
        }
        @Nullable Object[] params = buildParamList(invokable, paramIndex);
        try {
          @SuppressWarnings("unchecked") // We'll get a runtime exception if the type is wrong.
          Invokable<Object, ?> unsafe = (Invokable<Object, ?>) invokable;
          unsafe.invoke(instance, params);
          Assert.fail(
              "No exception thrown for parameter at index "
                  + paramIndex
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 23.3K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/testing/EqualsTesterTest.java

          return o == this || o == null;
        }
    
        @Override
        public int hashCode() {
          return 0;
        }
      }
    
      /** Test class that returns true even if the test object is of the wrong class */
      private static class InvalidEqualsIncompatibleClassObject {
    
        @Override
        public boolean equals(@Nullable Object o) {
          return o != null;
        }
    
        @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/reflect/TypeToken.java

     *       <pre>{@code
     * new TypeToken<List<String>>() {}
     * }</pre>
     *       <p>Note that it's critical that the actual type argument is carried by a subclass. The
     *       following code is wrong because it only captures the {@code <T>} type variable of the
     *       {@code listType()} method signature; while {@code <String>} is lost in erasure:
     *       <pre>{@code
     * class Util {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 53.6K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

      void oldRepeat(long reps) {
        for (int i = 0; i < reps; i++) {
          String x = oldRepeat(originalString, count);
          if (x.length() != (originalString.length() * count)) {
            throw new RuntimeException("Wrong length: " + x);
          }
        }
      }
    
      private static String oldRepeat(String string, int count) {
        // If this multiplication overflows, a NegativeArraySizeException or
        // OutOfMemoryError is not far behind
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

                  // we reached EOF
                  return new String(buffer, 0, bufIndex);
                }
                // otherwise we got the size wrong.  This can happen if the size changes between when
                // we called sizeIfKnown and when we started reading the file (or I guess if
                // maxCharsPerByte is wrong)
                // Fallback to an incremental approach
                StringBuilder builder = new StringBuilder(bufIndex + 32);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
Back to top