Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for Clone (0.15 sec)

  1. 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)
  2. 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)
  3. 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)
  4. guava-tests/test/com/google/common/io/ByteSourceTest.java

        ByteSource fewerBytes = new TestByteSource(newPreFilledByteArray(bytes.length / 2));
        assertFalse(source.contentEquals(fewerBytes));
    
        byte[] copy = bytes.clone();
        copy[9876] = 1;
        ByteSource oneByteOff = new TestByteSource(copy);
        assertFalse(source.contentEquals(oneByteOff));
      }
    
      public void testSlice() throws IOException {
        // Test preconditions
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        ByteSource fewerBytes = new TestByteSource(newPreFilledByteArray(bytes.length / 2));
        assertFalse(source.contentEquals(fewerBytes));
    
        byte[] copy = bytes.clone();
        copy[9876] = 1;
        ByteSource oneByteOff = new TestByteSource(copy);
        assertFalse(source.contentEquals(oneByteOff));
      }
    
      public void testSlice() throws IOException {
        // Test preconditions
    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)
  6. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/ImmutableSortedSet.java

       * @since 3.0
       */
      public static <E extends Comparable<? super E>> ImmutableSortedSet<E> copyOf(E[] elements) {
        return construct(Ordering.natural(), elements.length, elements.clone());
      }
    
      /**
       * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
       * When multiple elements are equivalent according to {@code compareTo()}, only the first one
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/HashCode.java

       *
       * @since 15.0 (since 12.0 in HashCodes)
       */
      public static HashCode fromBytes(byte[] bytes) {
        checkArgument(bytes.length >= 1, "A HashCode must contain at least 1 byte.");
        return fromBytesNoCopy(bytes.clone());
      }
    
      /**
       * Creates a {@code HashCode} from a byte array. The array is <i>not</i> copied defensively, so it
       * must be handed-off so as to preserve the immutability contract of {@code HashCode}.
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 12.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/reflect/TypesTest.java

            .asList()
            .containsExactlyElementsIn(asList(expected.getBounds()))
            .inOrder();
      }
    
      /**
       * Working with arrays requires defensive code. Verify that we clone the type array for both input
       * and output.
       */
      public void testNewParameterizedTypeImmutability() {
        Type[] typesIn = {String.class, Integer.class};
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

                UnsignedBytes.lexicographicalComparatorJavaImpl())) {
          for (int trials = 10; trials-- > 0; ) {
            byte[] left = new byte[1 + rnd.nextInt(32)];
            rnd.nextBytes(left);
            byte[] right = left.clone();
            assertThat(comparator.compare(left, right)).isEqualTo(0);
            int i = rnd.nextInt(left.length);
            left[i] ^= (byte) (1 + rnd.nextInt(255));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 13.4K bytes
    - Viewed (0)
Back to top