Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for newHashSetWithExpectedSize (0.2 sec)

  1. guava/src/com/google/common/collect/LinkedListMultimap.java

        }
      }
    
      /** An {@code Iterator} over distinct keys in key head order. */
      private final class DistinctKeyIterator implements Iterator<K> {
        final Set<K> seenKeys = Sets.newHashSetWithExpectedSize(keySet().size());
        @Nullable Node<K, V> next = head;
        @Nullable Node<K, V> current;
        int expectedModCount = modCount;
    
        private void checkForConcurrentModification() {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 18:35:44 UTC 2025
    - 27K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashTestUtils.java

       * collision rate looks sane.
       */
      static void assertInvariants(HashFunction hashFunction) {
        int objects = 100;
        Set<HashCode> hashcodes = Sets.newHashSetWithExpectedSize(objects);
        Random random = new Random(314159);
        for (int i = 0; i < objects; i++) {
          int value = random.nextInt();
          HashCode hashcode1 = hashFunction.hashInt(value);
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 18:19:59 UTC 2025
    - 25.6K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableSet.java

        private final Set<Object> delegate;
    
        JdkBackedSetBuilderImpl(SetBuilderImpl<E> toCopy) {
          super(toCopy); // initializes dedupedElements and distinct
          delegate = Sets.newHashSetWithExpectedSize(distinct);
          for (int i = 0; i < distinct; i++) {
            /*
             * requireNonNull is safe because we ensure that the first `distinct` elements have been
             * populated.
             */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Nov 07 16:09:47 UTC 2025
    - 35.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Sets.java

       */
      @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor call
      public static <E extends @Nullable Object> HashSet<E> newHashSet(E... elements) {
        HashSet<E> set = newHashSetWithExpectedSize(elements.length);
        Collections.addAll(set, elements);
        return set;
      }
    
      /**
       * Creates a <i>mutable</i> {@code HashSet} instance containing the given elements. A very thin
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Sep 22 18:35:44 UTC 2025
    - 81.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Maps.java

          try {
            return super.retainAll(checkNotNull(c));
          } catch (UnsupportedOperationException e) {
            // if the iterators don't support remove
            Set<@Nullable Object> keys = Sets.newHashSetWithExpectedSize(c.size());
            for (Object o : c) {
              /*
               * `o instanceof Entry` is guaranteed by `contains`, but we check it here to satisfy our
               * nullness checker.
               */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 157.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/Maps.java

          try {
            return super.retainAll(checkNotNull(c));
          } catch (UnsupportedOperationException e) {
            // if the iterators don't support remove
            Set<@Nullable Object> keys = Sets.newHashSetWithExpectedSize(c.size());
            for (Object o : c) {
              /*
               * `o instanceof Entry` is guaranteed by `contains`, but we check it here to satisfy our
               * nullness checker.
               */
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Mon Nov 17 22:50:48 UTC 2025
    - 163.5K bytes
    - Viewed (0)
Back to top