Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 205 for clone (0.23 sec)

  1. 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)
  2. 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)
  3. android/guava/src/com/google/common/hash/MacHashFunction.java

        this.supportsClone = supportsClone(prototype);
      }
    
      @Override
      public int bits() {
        return bits;
      }
    
      private static boolean supportsClone(Mac mac) {
        try {
          Object unused = mac.clone();
          return true;
        } catch (CloneNotSupportedException e) {
          return false;
        }
      }
    
      private static Mac getMac(String algorithmName, Key key) {
        try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 15 22:31:55 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  4. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java

            datasets[i][j] = rng.nextDouble();
          }
        }
      }
    
      private double[] dataset(int i) {
        // We must test on a fresh clone of the dataset each time. Doing sorts and quickselects on a
        // dataset which is already sorted or partially sorted is cheating.
        return datasets[i & 0xFF].clone();
      }
    
      @Benchmark
      double median(int reps) {
        double dummy = 0.0;
        for (int i = 0; i < reps; i++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  6. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  7. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          oos.writeObject(o);
          oos.flush();
          oos.close();
          ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(bos.toByteArray()));
          T clone = (T) ois.readObject();
          assertSame(o.getClass(), clone.getClass());
          return clone;
        } catch (Throwable t) {
          threadUnexpectedException(t);
          return null;
        }
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

      private static final ByteSource BROKEN_CLOSE_SOURCE =
          new TestByteSource(new byte[10], CLOSE_THROWS);
      private static final ByteSource BROKEN_OPEN_SOURCE =
          new TestByteSource(new byte[10], OPEN_THROWS);
      private static final ByteSource BROKEN_READ_SOURCE =
          new TestByteSource(new byte[10], READ_THROWS);
      private static final ByteSink BROKEN_CLOSE_SINK = new TestByteSink(CLOSE_THROWS);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/math/Quantiles.java

         * @throws IllegalArgumentException if {@code indexes} is empty
         */
        public ScaleAndIndexes indexes(int... indexes) {
          return new ScaleAndIndexes(scale, indexes.clone());
        }
    
        /**
         * Specifies multiple quantile indexes to be calculated, each index being the k in the kth
         * q-quantile.
         *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 29.9K bytes
    - Viewed (0)
Back to top