Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 123 for getCount (0.27 sec)

  1. android/guava/src/com/google/common/io/CountingInputStream.java

       *
       * @param in the input stream to be wrapped
       */
      public CountingInputStream(InputStream in) {
        super(checkNotNull(in));
      }
    
      /** Returns the number of bytes read. */
      public long getCount() {
        return count;
      }
    
      @Override
      public int read() throws IOException {
        int result = in.read();
        if (result != -1) {
          count++;
        }
        return result;
      }
    
      @Override
    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)
  2. guava-testlib/src/com/google/common/testing/GcFinalization.java

      @SuppressWarnings("removal") // b/260137033
      public static void await(CountDownLatch latch) {
        if (latch.getCount() == 0) {
          return;
        }
        long timeoutSeconds = timeoutSeconds();
        long deadline = System.nanoTime() + SECONDS.toNanos(timeoutSeconds);
        do {
          System.runFinalization();
          if (latch.getCount() == 0) {
            return;
          }
          System.gc();
          try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. src/main/java/jcifs/internal/smb2/io/Smb2WriteResponse.java

    
        /**
         * @param config
         */
        public Smb2WriteResponse ( Configuration config ) {
            super(config);
        }
    
    
        /**
         * @return the count
         */
        public final int getCount () {
            return this.count;
        }
    
    
        /**
         * @return the remaining
         */
        public final int getRemaining () {
            return this.remaining;
        }
    
    
        /**
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Sun Jul 01 13:12:10 GMT 2018
    - 2.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

        assertEquals("1", cache.getUnchecked(1));
        assertEquals(0, removalListener.getCount());
    
        count.set(0);
        cache.refresh(2);
        checkLoggedCause(e);
    
        assertEquals("2", cache.getUnchecked(2));
        assertEquals(0, removalListener.getCount());
      }
    
    
      @AndroidIncompatible // Depends on GC behavior
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/TestingRemovalListeners.java

        @Override
        public void onRemoval(RemovalNotification<K, V> notification) {
          count.incrementAndGet();
          lastNotification = notification;
        }
    
        public int getCount() {
          return count.get();
        }
    
        public K getLastEvictedKey() {
          return lastNotification.getKey();
        }
    
        public V getLastEvictedValue() {
          return lastNotification.getValue();
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/collect/ConcurrentHashMultisetBenchmark.java

        private List<E> snapshot() {
          List<E> list = Lists.newArrayListWithExpectedSize(size());
          for (Multiset.Entry<E> entry : entrySet()) {
            E element = entry.getElement();
            for (int i = entry.getCount(); i > 0; i--) {
              list.add(element);
            }
          }
          return list;
        }
    
        // Modification Operations
    
        /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 16.6K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbRandomAccessFile.java

                        cnt = resp.getCount();
                    }
                    else {
                        SmbComWriteAndX request = new SmbComWriteAndX(th.getConfig(), fh.getFid(), this.fp, len - w - off, b, off, w, null);
                        th.send(request, this.write_andx_resp, RequestParam.NO_RETRY);
                        cnt = this.write_andx_resp.getCount();
                    }
    
                    this.fp += cnt;
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Wed Jan 08 12:01:33 GMT 2020
    - 18.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
        // Verify that all of the runnables execute in a reasonable amount of time.
        assertTrue(countDownLatch.await(1L, TimeUnit.SECONDS));
      }
    
      public void testExecute_idempotent() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/TreeMultiset.java

          @Override
          @ParametricNullness
          public E getElement() {
            return baseEntry.getElement();
          }
    
          @Override
          public int getCount() {
            int result = baseEntry.getCount();
            if (result == 0) {
              return count(getElement());
            } else {
              return result;
            }
          }
        };
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 34.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
        // Verify that all of the runnables execute in a reasonable amount of time.
        assertTrue(countDownLatch.await(1L, TimeUnit.SECONDS));
      }
    
      public void testExecute_idempotent() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
Back to top