Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 523 for Array (0.19 sec)

  1. android/guava/src/com/google/common/collect/ObjectArrays.java

        T[] result = newArray(array, array.length + 1);
        result[0] = element;
        System.arraycopy(array, 0, result, 1, array.length);
        return result;
      }
    
      /**
       * Returns a new array that appends {@code element} to {@code array}.
       *
       * @param array the array of elements to prepend
       * @param element the element to append to the end
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jun 12 15:59:22 GMT 2023
    - 9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/primitives/Bytes.java

       * i, i + target.length)} contains exactly the same elements as {@code target}.
       *
       * @param array the array to search for the sequence {@code target}
       * @param target the array to search for as a sub-sequence of {@code array}
       */
      public static int indexOf(byte[] array, byte[] target) {
        checkNotNull(array, "array");
        checkNotNull(target, "target");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/primitives/Floats.java

        Arrays.sort(array, fromIndex, toIndex);
        reverse(array, fromIndex, toIndex);
      }
    
      /**
       * Reverses the elements of {@code array}. This is equivalent to {@code
       * Collections.reverse(Floats.asList(array))}, but is likely to be more efficient.
       *
       * @since 23.1
       */
      public static void reverse(float[] array) {
        checkNotNull(array);
        reverse(array, 0, array.length);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/primitives/UnsignedInts.java

       *     in the array according to {@link #compare}
       * @throws IllegalArgumentException if {@code array} is empty
       */
      public static int max(int... array) {
        checkArgument(array.length > 0);
        int max = flip(array[0]);
        for (int i = 1; i < array.length; i++) {
          int next = flip(array[i]);
          if (next > max) {
            max = next;
          }
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedBytes.java

       * @since 23.1
       */
      public static void sort(byte[] array, int fromIndex, int toIndex) {
        checkNotNull(array);
        checkPositionIndexes(fromIndex, toIndex, array.length);
        for (int i = fromIndex; i < toIndex; i++) {
          array[i] = flip(array[i]);
        }
        Arrays.sort(array, fromIndex, toIndex);
        for (int i = fromIndex; i < toIndex; i++) {
          array[i] = flip(array[i]);
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 18.3K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

     */
    public class IntMathBenchmark {
      private static int[] exponent = new int[ARRAY_SIZE];
      private static int[] factorial = new int[ARRAY_SIZE];
      private static int[] binomial = new int[ARRAY_SIZE];
      private static final int[] positive = new int[ARRAY_SIZE];
      private static final int[] nonnegative = new int[ARRAY_SIZE];
      private static final int[] ints = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/testers/SetCreationTester.java

      @CollectionSize.Require(absent = {ZERO, ONE})
      public void testCreateWithDuplicates_nullDuplicatesNotRejected() {
        E[] array = createArrayWithNullElement();
        array[0] = null;
        collection = getSubjectGenerator().create(array);
    
        List<E> expectedWithDuplicateRemoved = Arrays.asList(array).subList(1, getNumElements());
        expectContents(expectedWithDuplicateRemoved);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 3.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/BooleansTest.java

        assertThat(Booleans.concat(ARRAY_FALSE)).isEqualTo(ARRAY_FALSE);
        assertThat(Booleans.concat(ARRAY_FALSE)).isNotSameInstanceAs(ARRAY_FALSE);
        assertThat(Booleans.concat(EMPTY, ARRAY_FALSE, EMPTY)).isEqualTo(ARRAY_FALSE);
        assertThat(Booleans.concat(ARRAY_FALSE, ARRAY_FALSE, ARRAY_FALSE))
            .isEqualTo(new boolean[] {false, false, false});
        assertThat(Booleans.concat(ARRAY_FALSE, ARRAY_FALSE_TRUE))
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 15:43:29 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/BooleansTest.java

        assertThat(Booleans.concat(ARRAY_FALSE)).isEqualTo(ARRAY_FALSE);
        assertThat(Booleans.concat(ARRAY_FALSE)).isNotSameInstanceAs(ARRAY_FALSE);
        assertThat(Booleans.concat(EMPTY, ARRAY_FALSE, EMPTY)).isEqualTo(ARRAY_FALSE);
        assertThat(Booleans.concat(ARRAY_FALSE, ARRAY_FALSE, ARRAY_FALSE))
            .isEqualTo(new boolean[] {false, false, false});
        assertThat(Booleans.concat(ARRAY_FALSE, ARRAY_FALSE_TRUE))
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 15:43:29 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/QuantilesAlgorithm.java

              swap(array, from, to);
            }
            return array[k];
          } else {
            int midIndex = (from + to) >>> 1;
            // Choose the median of the elements at the from, to and mid indexes,
            // and rearrange so that array[from]<=array[from+1], and
            // array[to] => array[from + 1].
    
            swap(array, midIndex, from + 1);
    
            if (array[from] > array[to]) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 01 16:30:37 GMT 2022
    - 7.1K bytes
    - Viewed (0)
Back to top