Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for newArrayListWithCapacity (0.11 sec)

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

        final ArrayList<E> contents;
    
        public Builder() {
          this.contents = Lists.newArrayList();
        }
    
        Builder(int initialCapacity) {
          this.contents = Lists.newArrayListWithCapacity(initialCapacity);
        }
    
        @CanIgnoreReturnValue
        @Override
        public Builder<E> add(E element) {
          contents.add(checkNotNull(element));
          return this;
        }
    
    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/test/com/google/common/collect/ListsTest.java

        ArrayList<Integer> list = Lists.newArrayListWithCapacity(0);
        assertEquals(emptyList(), list);
    
        ArrayList<Integer> bigger = Lists.newArrayListWithCapacity(256);
        assertEquals(emptyList(), bigger);
      }
    
      public void testNewArrayListWithCapacity_negative() {
        assertThrows(IllegalArgumentException.class, () -> Lists.newArrayListWithCapacity(-1));
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.4K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java

        @Nullable Comparator<? super V> valueComparator;
    
        public Builder() {
          this.entries = Lists.newArrayList();
        }
    
        Builder(int initCapacity) {
          this.entries = Lists.newArrayListWithCapacity(initCapacity);
        }
    
        @CanIgnoreReturnValue
        public Builder<K, V> put(K key, V value) {
          entries.add(entryOf(key, value));
          return this;
        }
    
        @CanIgnoreReturnValue
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 16.7K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java

              FactoryMethodReturnsNullException {
        List<Parameter> params = factory.getParameters();
        List<FreshValueGenerator> argGenerators = Lists.newArrayListWithCapacity(params.size());
        List<@Nullable Object> args = Lists.newArrayListWithCapacity(params.size());
        for (Parameter param : params) {
          FreshValueGenerator generator = newFreshValueGenerator();
          argGenerators.add(generator);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 32.5K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableList.java

        private final ArrayList<E> contents;
    
        public Builder() {
          contents = Lists.newArrayList();
        }
    
        Builder(int capacity) {
          contents = Lists.newArrayListWithCapacity(capacity);
        }
    
        @CanIgnoreReturnValue
        @Override
        public Builder<E> add(E element) {
          contents.add(checkNotNull(element));
          return this;
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 06 18:32:41 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/ServiceManager.java

          return builder.build();
        }
    
        ImmutableMap<Service, Long> startupTimes() {
          List<Entry<Service, Long>> loadTimes;
          monitor.enter();
          try {
            loadTimes = Lists.newArrayListWithCapacity(startupTimers.size());
            // N.B. There will only be an entry in the map if the service has started
            for (Entry<Service, Stopwatch> entry : startupTimers.entrySet()) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

        EnumMap<E, LockGraphNode> map = Maps.newEnumMap(clazz);
        E[] keys = clazz.getEnumConstants();
        int numKeys = keys.length;
        ArrayList<LockGraphNode> nodes = Lists.newArrayListWithCapacity(numKeys);
        // Create a LockGraphNode for each enum value.
        for (E key : keys) {
          LockGraphNode node = new LockGraphNode(getLockName(key));
          nodes.add(node);
          map.put(key, node);
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 18 15:05:43 UTC 2025
    - 35.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableSortedMultiset.java

       */
      public static <E extends Comparable<? super E>> ImmutableSortedMultiset<E> of(
          E e1, E e2, E e3, E e4, E e5, E e6, E... remaining) {
        int size = remaining.length + 6;
        List<E> all = Lists.newArrayListWithCapacity(size);
        Collections.addAll(all, e1, e2, e3, e4, e5, e6);
        Collections.addAll(all, remaining);
        return copyOf(Ordering.natural(), all);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 29.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

          }
        }
        Method generate = GENERATORS.get(rawType);
        if (generate != null) {
          ImmutableList<Parameter> params = Invokable.from(generate).getParameters();
          List<Object> args = Lists.newArrayListWithCapacity(params.size());
          TypeVariable<?>[] typeVars = rawType.getTypeParameters();
          for (int i = 0; i < params.size(); i++) {
            TypeToken<?> paramType = type.resolveType(typeVars[i]);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 28.7K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

          }
        }
        Method generate = GENERATORS.get(rawType);
        if (generate != null) {
          ImmutableList<Parameter> params = Invokable.from(generate).getParameters();
          List<Object> args = Lists.newArrayListWithCapacity(params.size());
          TypeVariable<?>[] typeVars = rawType.getTypeParameters();
          for (int i = 0; i < params.size(); i++) {
            TypeToken<?> paramType = type.resolveType(typeVars[i]);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 28.1K bytes
    - Viewed (0)
Back to top