Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 158 for count (0.2 sec)

  1. guava-tests/benchmark/com/google/common/collect/MultisetIteratorBenchmark.java

          // The JVM will return interned values for small ints.
          Integer value = random.nextInt(1000) + 128;
          int count = Math.min(random.nextInt(10) + 1, sizeRemaining);
          sizeRemaining -= count;
          hashMultiset.add(value, count);
          linkedHashMultiset.add(value, count);
          treeMultiset.add(value, count);
        }
    
        // TODO(kevinb): convert to assert once benchmark tests enable asserts by default
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        return multiset(ImmutableMap.of(value1, count1, value2, count2));
      }
    
      private static <T> ImmutableMultiset<T> multiset(Map<T, Integer> counts) {
        ImmutableMultiset.Builder<T> builder = ImmutableMultiset.builder();
        for (Entry<T, Integer> entry : counts.entrySet()) {
          builder.addCopies(entry.getKey(), entry.getValue());
        }
        return builder.build();
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

          int remaining = input.remaining();
          if (count + remaining > buf.length) {
            buf = Arrays.copyOf(buf, count + remaining);
          }
          input.get(buf, count, remaining);
          count += remaining;
        }
    
        byte[] byteArray() {
          return buf;
        }
    
        int length() {
          return count;
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  4. maven-core/src/test/java/org/apache/maven/settings/SettingsUtilsTest.java

            Map<String, String> props = new HashMap<>();
            int count = entropy.nextInt(10);
            for (int i = 0; i < count; i++) {
                props.put("name" + Long.toHexString(entropy.nextLong()), "value" + Long.toHexString(entropy.nextLong()));
            }
            count = entropy.nextInt(3);
            List<Repository> repos = new ArrayList<>();
            for (int i = 0; i < count; i++) {
                Repository r = Repository.newBuilder()
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/collect/testing/google/MultisetEntrySetTester.java

      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @MultisetFeature.Require(ENTRIES_ARE_VIEWS)
      public void testEntryViewReflectsRemove() {
        initThreeCopies();
        assertEquals(3, getMultiset().count(e0()));
        Multiset.Entry<E> entry = Iterables.getOnlyElement(getMultiset().entrySet());
        assertEquals(3, entry.getCount());
        assertTrue(getMultiset().remove(e0()));
        assertEquals(2, entry.getCount());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 9.6K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

        resetContainer(
            Helpers.mapEntry(k0(), v0()), Helpers.mapEntry(k0(), v1()), Helpers.mapEntry(k1(), v0()));
        Multiset<K> keys = multimap().keys();
        assertEquals(2, keys.count(k0()));
        assertEquals(1, keys.count(k1()));
        assertEquals(3, keys.size());
        assertContainsAllOf(keys, k0(), k1());
        assertContainsAllOf(
            keys.entrySet(), Multisets.immutableEntry(k0(), 2), Multisets.immutableEntry(k1(), 1));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 4.3K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapKeysTester.java

        resetContainer(
            Helpers.mapEntry(k0(), v0()), Helpers.mapEntry(k0(), v1()), Helpers.mapEntry(k1(), v0()));
        Multiset<K> keys = multimap().keys();
        assertEquals(2, keys.count(k0()));
        assertEquals(1, keys.count(k1()));
        assertEquals(3, keys.size());
        assertContainsAllOf(keys, k0(), k1());
        assertContainsAllOf(
            keys.entrySet(), Multisets.immutableEntry(k0(), 2), Multisets.immutableEntry(k1(), 1));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 4.3K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/score/ScoreUpdater.java

        public String execute() {
            final StringBuilder resultBuf = new StringBuilder();
            scoreBoosterList.forEach(b -> {
                try {
                    final long count = b.process();
                    resultBuf.append(b.getClass().getSimpleName()).append(" : ").append(count).append('\n');
                } catch (final Exception e) {
                    logger.warn("Failed to update scores.", e);
                    resultBuf.append(e.getMessage()).append('\n');
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/base/JoinerBenchmark.java

      @Param({"3", "30", "300"})
      int count;
    
      @Param({"0", "1", "16", "32", "100"})
      int componentLength;
    
      private Iterable<String> components;
    
      @BeforeExperiment
      void setUp() {
        String component = Strings.repeat("a", componentLength);
        String[] raw = new String[count];
        Arrays.fill(raw, component);
        components = Arrays.asList(raw);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/CountingInputStream.java

      public long getCount() {
        return count;
      }
    
      @Override
      public int read() throws IOException {
        int result = in.read();
        if (result != -1) {
          count++;
        }
        return result;
      }
    
      @Override
      public int read(byte[] b, int off, int len) throws IOException {
        int result = in.read(b, off, len);
        if (result != -1) {
          count += result;
        }
        return result;
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 2.4K bytes
    - Viewed (0)
Back to top