Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for clone (0.03 sec)

  1. 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) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  2. 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;
        }
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  3. 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));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  4. 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) {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertTrue(source.wasStreamOpened());
        assertFalse(source.wasStreamClosed());
    
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ByteStreams.copy(in, out);
        in.close();
        out.close();
    
        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
      public void testSize() throws IOException {
        assertEquals(bytes.length, source.size());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 15:26:58 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  6. 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};
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  7. 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};
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  8. 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));
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableCollection.java

            this.contents =
                Arrays.copyOf(this.contents, expandedCapacity(contents.length, minCapacity));
            forceCopy = false;
          } else if (forceCopy) {
            this.contents = contents.clone();
            forceCopy = false;
          }
        }
    
        @CanIgnoreReturnValue
        @Override
        public ArrayBasedBuilder<E> add(E element) {
          checkNotNull(element);
          getReadyToExpandTo(size + 1);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableSet.java

        switch (elements.length) {
          case 0:
            return of();
          case 1:
            return of(elements[0]);
          default:
            return construct(elements.length, elements.clone());
        }
      }
    
      ImmutableSet() {}
    
      /** Returns {@code true} if the {@code hashCode()} method runs quickly. */
      boolean isHashCodeFast() {
        return false;
      }
    
      @Override
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top