Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for newArray (0.29 sec)

  1. guava-tests/test/com/google/common/collect/ObjectArraysTest.java

      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Empty() {
        String[] empty = ObjectArrays.newArray(String.class, 0);
        assertEquals(String[].class, empty.getClass());
        assertThat(empty).isEmpty();
      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Nonempty() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/ObjectArrays.java

       * @param length the length of the new array
       */
      public static <T extends @Nullable Object> T[] newArray(T[] reference, int length) {
        return Platform.newArray(reference, length);
      }
    
      /**
       * Returns a new array that contains the concatenated contents of two arrays.
       *
       * @param first the first array of elements to concatenate
       * @param second the second array of elements to concatenate
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jun 12 15:59:22 GMT 2023
    - 9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/ObjectArraysTest.java

      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Empty() {
        String[] empty = ObjectArrays.newArray(String.class, 0);
        assertEquals(String[].class, empty.getClass());
        assertThat(empty).isEmpty();
      }
    
      @GwtIncompatible // ObjectArrays.newArray(Class, int)
      public void testNewArray_fromClass_Nonempty() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ForwardingCollection.java

       * this implementation.
       *
       * @since 7.0
       */
      protected @Nullable Object[] standardToArray() {
        @Nullable Object[] newArray = new @Nullable Object[size()];
        return toArray(newArray);
      }
    
      /**
       * A sensible definition of {@link #toArray(Object[])} in terms of {@link #size} and {@link
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 8.2K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Platform.java

      }
    
      static <T> T[] newArray(T[] reference, int length) {
        T[] empty = reference.length == 0 ? reference : Arrays.copyOf(reference, 0);
        return Arrays.copyOf(empty, length);
      }
    
      /** Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()). */
      static <T> T[] copy(Object[] source, int from, int to, T[] arrayOfType) {
        T[] result = newArray(arrayOfType, to - from);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Jun 29 18:16:45 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ForwardingCollection.java

       * this implementation.
       *
       * @since 7.0
       */
      protected @Nullable Object[] standardToArray() {
        @Nullable Object[] newArray = new @Nullable Object[size()];
        return toArray(newArray);
      }
    
      /**
       * A sensible definition of {@link #toArray(Object[])} in terms of {@link #size} and {@link
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 8.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Platform.java

       * about arrays for now, as they're a mess. (We previously discussed this in the review of
       * ObjectArrays, which is the main caller of this method.)
       */
      static <T extends @Nullable Object> T[] newArray(T[] reference, int length) {
        T[] empty = reference.length == 0 ? reference : Arrays.copyOf(reference, 0);
        return Arrays.copyOf(empty, length);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 4.9K bytes
    - Viewed (0)
Back to top