Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 208 for clone (0.14 sec)

  1. android/guava-tests/benchmark/com/google/common/collect/ComparatorDelegationOverheadBenchmark.java

        for (int i = 0; i < reps; i++) {
          Integer[] copy = inputArrays[i & 0xFF].clone();
          Arrays.sort(copy);
          tmp += copy[0];
        }
        return tmp;
      }
    
      @Benchmark
      int arraysSortOrderingNatural(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          Integer[] copy = inputArrays[i & 0xFF].clone();
          Arrays.sort(copy, Ordering.natural());
          tmp += copy[0];
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/Platform.java

     *
     * <p>This class is emulated in GWT.
     *
     * @author Hayward Chan
     */
    @GwtCompatible
    final class Platform {
      static <T> T[] clone(T[] array) {
        return array.clone();
      }
    
      // Class.cast is not supported in GWT.  This method is a no-op in GWT.
      static void checkCast(Class<?> clazz, Object obj) {
        Object unused = clazz.cast(obj);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Aug 04 01:39:13 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/hash/MessageDigestCreationBenchmark.java

          retValue ^= MessageDigest.getInstance(algorithm).getDigestLength();
        }
        return retValue;
      }
    
      @Benchmark
      int clone(int reps) throws Exception {
        int retValue = 0;
        for (int i = 0; i < reps; i++) {
          retValue ^= ((MessageDigest) md.clone()).getDigestLength();
        }
        return retValue;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ImmutableEnumSet.java

        }
      }
    
      /*
       * Notes on EnumSet and <E extends Enum<E>>:
       *
       * This class isn't an arbitrary ForwardingImmutableSet because we need to
       * know that calling {@code clone()} during deserialization will return an
       * object that no one else has a reference to, allowing us to guarantee
       * immutability. Hence, we support only {@link EnumSet}.
       */
      private final transient EnumSet<E> delegate;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/MessageDigestHashFunction.java

        this.bytes = bytes;
        this.supportsClone = supportsClone(prototype);
      }
    
      private static boolean supportsClone(MessageDigest digest) {
        try {
          Object unused = digest.clone();
          return true;
        } catch (CloneNotSupportedException e) {
          return false;
        }
      }
    
      @Override
      public int bits() {
        return bytes * Byte.SIZE;
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 25 20:32:46 GMT 2022
    - 5K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

    @GwtCompatible(emulated = true)
    @ElementTypesAreNonnullByDefault
    public class Helpers {
      // Clone of Objects.equal
      static boolean equal(@Nullable Object a, @Nullable Object b) {
        return a == b || (a != null && a.equals(b));
      }
    
      // Clone of Lists.newArrayList
      public static <E extends @Nullable Object> List<E> copyToList(Iterable<? extends E> elements) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testRead_putByteArrayOutOfBound() throws Exception {
        byte[] buf = new byte[100];
        byte[] expectedBytes = buf.clone();
        System.arraycopy(testBytes, 0, expectedBytes, 0, testBytes.length);
    
        HashingInputStream in = new HashingInputStream(hashFunction, buffer);
    
        int numOfByteRead = in.read(buf, 0, 100);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

      public void testSingleQuantile_median() {
        double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone());
        for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
          assertWithMessage("Mismatch between %s and %s", algorithm, REFERENCE_ALGORITHM)
              .that(algorithm.singleQuantile(1, 2, dataset.clone()))
              .isWithin(ALLOWED_ERROR)
              .of(referenceValue);
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/TestsForListsInJavaUtil.java

        return ListTestSuiteBuilder.using(
                new TestStringListGenerator() {
                  @Override
                  public List<String> create(String[] elements) {
                    return Arrays.asList(elements.clone());
                  }
                })
            .named("Arrays.asList")
            .withFeatures(
                ListFeature.SUPPORTS_SET,
                CollectionFeature.SERIALIZABLE,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 12.1K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

      public void testSingleQuantile_median() {
        double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone());
        for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
          assertWithMessage("Mismatch between %s and %s", algorithm, REFERENCE_ALGORITHM)
              .that(algorithm.singleQuantile(1, 2, dataset.clone()))
              .isWithin(ALLOWED_ERROR)
              .of(referenceValue);
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
Back to top