Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for ensureCapacity (0.13 sec)

  1. guava-tests/test/com/google/common/primitives/BytesTest.java

        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Bytes.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Bytes.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Bytes.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Bytes.ensureCapacity(ARRAY1, 2, 1))
            .isEqualTo(new byte[] {(byte) 1, (byte) 0, (byte) 0});
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/BytesTest.java

        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Bytes.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Bytes.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Bytes.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Bytes.ensureCapacity(ARRAY1, 2, 1))
            .isEqualTo(new byte[] {(byte) 1, (byte) 0, (byte) 0});
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/CharsTest.java

      }
    
      public void testEnsureCapacity() {
        assertThat(Chars.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Chars.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Chars.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Chars.ensureCapacity(ARRAY1, 2, 1))
            .isEqualTo(new char[] {(char) 1, (char) 0, (char) 0});
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

      public void setUp() {
        // precalculate some random strings of ascii characters.
        StringBuilder sb = new StringBuilder();
        Random random = new Random(0xdeadbeef); // for unpredictable but reproducible behavior
        sb.ensureCapacity(size);
        for (int k = 0; k < size; k++) {
          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        data = sb.toString();
      }
    
      @Benchmark
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:59:54 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

      public void setUp() {
        // precalculate some random strings of ascii characters.
        StringBuilder sb = new StringBuilder();
        Random random = new Random(0xdeadbeef); // for unpredictable but reproducible behavior
        sb.ensureCapacity(size);
        for (int k = 0; k < size; k++) {
          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        data = sb.toString();
      }
    
      @Benchmark
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:59:54 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/DoublesTest.java

        assertThat(Doubles.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Doubles.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Doubles.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1);
        assertThat(
                Arrays.equals(
                    new double[] {(double) 1, (double) 0, (double) 0},
                    Doubles.ensureCapacity(ARRAY1, 2, 1)))
            .isTrue();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

      public void setUp() {
        charset = Charset.forName(charsetName);
        StringBuilder sb = new StringBuilder();
        Random random = new Random(0xdeadbeef); // for unpredictable but reproducible behavior
        sb.ensureCapacity(size);
        for (int k = 0; k < size; k++) {
          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        String string = sb.toString();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/primitives/BooleansTest.java

        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Booleans.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Booleans.ensureCapacity(ARRAY_FALSE, 0, 1)).isSameInstanceAs(ARRAY_FALSE);
        assertThat(Booleans.ensureCapacity(ARRAY_FALSE, 1, 1)).isSameInstanceAs(ARRAY_FALSE);
        assertThat(Booleans.ensureCapacity(new boolean[] {true}, 2, 1))
            .isEqualTo(new boolean[] {true, false, false});
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 24.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/primitives/FloatsTest.java

      public void testEnsureCapacity() {
        assertThat(Floats.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Floats.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Floats.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1);
        assertThat(
                Arrays.equals(
                    new float[] {(float) 1, (float) 0, (float) 0}, Floats.ensureCapacity(ARRAY1, 2, 1)))
            .isTrue();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/IntsTest.java

        }
      }
    
      public void testEnsureCapacity() {
        assertThat(Ints.ensureCapacity(EMPTY, 0, 1)).isSameInstanceAs(EMPTY);
        assertThat(Ints.ensureCapacity(ARRAY1, 0, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Ints.ensureCapacity(ARRAY1, 1, 1)).isSameInstanceAs(ARRAY1);
        assertThat(Ints.ensureCapacity(ARRAY1, 2, 1)).isEqualTo(new int[] {(int) 1, (int) 0, (int) 0});
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.1K bytes
    - Viewed (0)
Back to top