Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ensureCapacity (0.07 sec)

  1. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSet.java

          contents.ensureCapacity(contents.size() + elements.length);
          super.add(elements);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Builder<E> addAll(Iterable<? extends E> elements) {
          if (elements instanceof Collection) {
            Collection<?> collection = (Collection<?>) elements;
            contents.ensureCapacity(contents.size() + collection.size());
          }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  2. 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();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  3. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 5.2K bytes
    - Viewed (0)
Back to top