Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 316 for cout (0.65 sec)

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

            @SuppressWarnings("unchecked") // we only put Ts in it
            @Nullable
            T[] array = (@Nullable T[]) new Object[size];
            int count = 0;
            for (; count < size && iterator.hasNext(); count++) {
              array[count] = iterator.next();
            }
            for (int i = count; i < size; i++) {
              array[i] = null; // for GWT
            }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 51.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        AtomicInteger initial = new AtomicInteger(INITIAL_COUNT);
        when(backingMap.get(KEY)).thenReturn(initial);
    
        assertEquals(INITIAL_COUNT, multiset.add(KEY, COUNT_TO_ADD));
        assertEquals(INITIAL_COUNT + COUNT_TO_ADD, initial.get());
      }
    
      public void testAdd_laterFewWithOverflow() {
        final int INITIAL_COUNT = 92384930;
        final int COUNT_TO_ADD = Integer.MAX_VALUE - INITIAL_COUNT + 1;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/CountTest.java

      }
    
      public void testAddAndGet() {
        Count holder = new Count(20);
        assertEquals(21, holder.addAndGet(1));
      }
    
      public void testGetAndSet() {
        Count holder = new Count(10);
        assertEquals(10, holder.getAndSet(20));
        assertEquals(20, holder.get());
      }
    
      public void testSet() {
        Count holder = new Count(10);
        holder.set(20);
        assertEquals(20, holder.get());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/PairedStatsAccumulator.java

                      * values.count();
        }
        yStats.addAll(values.yStats());
      }
    
      /** Returns an immutable snapshot of the current statistics. */
      public PairedStats snapshot() {
        return new PairedStats(xStats.snapshot(), yStats.snapshot(), sumOfProductsOfDeltas);
      }
    
      /** Returns the number of pairs in the dataset. */
      public long count() {
        return xStats.count();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri May 12 17:02:53 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/EnumMultiset.java

      @Override
      public int setCount(E element, int count) {
        checkIsE(element);
        checkNonnegative(count, "count");
        int index = element.ordinal();
        int oldCount = counts[index];
        counts[index] = count;
        size += count - oldCount;
        if (oldCount == 0 && count > 0) {
          distinctElements++;
        } else if (oldCount > 0 && count == 0) {
          distinctElements--;
        }
        return oldCount;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/google/MultisetForEachEntryTester.java

        List<Entry<E>> expected = new ArrayList<>(getMultiset().entrySet());
        List<Entry<E>> actual = new ArrayList<>();
        getMultiset()
            .forEachEntry((element, count) -> actual.add(Multisets.immutableEntry(element, count)));
        Helpers.assertEqualIgnoringOrder(expected, actual);
      }
    
      @CollectionFeature.Require(KNOWN_ORDER)
      public void testForEachEntryOrdered() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/EnumMultisetTest.java

        ms.add(Color.RED);
        assertEquals(0, ms.count(Color.BLUE));
        assertEquals(1, ms.count(Color.YELLOW));
        assertEquals(2, ms.count(Color.RED));
      }
    
      public void testCollectionCreate() {
        Multiset<Color> ms = EnumMultiset.create(asList(Color.RED, Color.YELLOW, Color.RED));
        assertEquals(0, ms.count(Color.BLUE));
        assertEquals(1, ms.count(Color.YELLOW));
        assertEquals(2, ms.count(Color.RED));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 26 16:35:21 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

                          holder.count++;
                          return null;
                        }
                      },
                      directExecutor());
            }
          }
          settableFuture.set(null);
          completeLengthChecks = allAsList(lengthChecks).get();
        } finally {
          service.shutdown();
        }
        assertThat(holder.count).isEqualTo(ITERATION_COUNT);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

                          holder.count++;
                          return null;
                        }
                      },
                      directExecutor());
            }
          }
          settableFuture.set(null);
          completeLengthChecks = allAsList(lengthChecks).get();
        } finally {
          service.shutdown();
        }
        assertThat(holder.count).isEqualTo(ITERATION_COUNT);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/graph/GraphsTest.java

      private static final int NODE_COUNT = 20;
      private static final int EDGE_COUNT = 20;
      // TODO(user): Consider adding both error messages from here and {@link AbstractNetworkTest}
      // in one class (may be a utility class for error messages).
      private static final String ERROR_PARALLEL_EDGE = "connected by a different edge";
      private static final String ERROR_NEGATIVE_COUNT = "is non-negative";
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 24.9K bytes
    - Viewed (0)
Back to top