Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 94 for Clone (0.13 sec)

  1. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Aug 04 01:39:13 GMT 2022
    - 1.3K 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/MinimalCollection.java

      MinimalCollection(Class<? super @NonNull E> type, boolean allowNulls, E... contents) {
        // TODO: consider making it shuffle the contents to test iteration order.
        this.contents = Platform.clone(contents);
        this.type = type;
        this.allowNulls = allowNulls;
    
        if (!allowNulls) {
          for (Object element : contents) {
            if (element == null) {
              throw new NullPointerException();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K 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) {
    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)
  5. 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)
  6. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/reflect/SubtypeTester.java

              }
            });
        for (Method method : methods) {
          if (method.isAnnotationPresent(TestSubtype.class)) {
            method.setAccessible(true);
            SubtypeTester tester = (SubtypeTester) clone();
            tester.method = method;
            method.invoke(tester, new Object[] {null});
          }
        }
      }
    
      private Type getOnlyParameterType() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  8. 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)
  9. guava-gwt/test-super/com/google/common/collect/testing/super/com/google/common/collect/testing/Platform.java

     *
     * @author Hayward Chan
     */
    final class Platform {
      // Class.cast is not supported in GWT.
      static void checkCast(Class<?> clazz, Object obj) {}
    
      static <T> T[] clone(T[] array) {
        return (T[]) Arrays.copyOfRange(array, 0, array.length);
      }
    
      // TODO: Consolidate different copies in one single place.
      static String format(String template, Object... args) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.1K bytes
    - Viewed (0)
  10. 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)
Back to top