Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 46 for advanced (0.19 sec)

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

       * hasNext()} returns {@code false}, whichever comes first.
       *
       * @return the number of elements the iterator was advanced
       * @since 13.0 (since 3.0 as {@code Iterators.skip})
       */
      @CanIgnoreReturnValue
      public static int advance(Iterator<?> iterator, int numberToAdvance) {
        checkNotNull(iterator);
        checkArgument(numberToAdvance >= 0, "numberToAdvance must be nonnegative");
    
    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. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

                .build();
    
        cache.put(0, 10);
        cache.put(2, 30);
    
        fakeTicker.advance(999, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
        fakeTicker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
        fakeTicker.advance(1000, TimeUnit.MILLISECONDS);
        assertEquals(null, cache.getIfPresent(0));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 15.1K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      }
    
      /**
       * Inserts element at current put position, advances, and signals. Call only when occupying
       * monitor.
       */
      private void insert(E x) {
        items[putIndex] = x;
        putIndex = inc(putIndex);
        ++count;
      }
    
      /**
       * Extracts element at current take position, advances, and signals. Call only when occupying
       * monitor.
       */
      private E extract() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

          return false;
        }
    
        private void checkModCount() {
          if (modCount != expectedModCount) {
            throw new ConcurrentModificationException();
          }
        }
    
        /**
         * Advances nextCursor to the index of the first element after {@code c} that is not in {@code
         * skipMe} and returns {@code size()} if there is no such element.
         */
        private void nextNotInSkipMe(int c) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        list.add("b");
        Iterator<String> iterator = list.iterator();
        advance(iterator, 1);
        assertEquals("b", iterator.next());
      }
    
      public void testAdvance_pastEnd() {
        List<String> list = newArrayList();
        list.add("a");
        list.add("b");
        Iterator<String> iterator = list.iterator();
        advance(iterator, 5);
        assertFalse(iterator.hasNext());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Apr 30 18:43:01 GMT 2024
    - 56.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheTesting.java

      }
    
      static void expireEntries(LocalCache<?, ?> cchm, long expiringTime, FakeTicker ticker) {
    
        for (Segment<?, ?> segment : cchm.segments) {
          drainRecencyQueue(segment);
        }
    
        ticker.advance(2 * expiringTime, TimeUnit.MILLISECONDS);
    
        long now = ticker.read();
        for (Segment<?, ?> segment : cchm.segments) {
          expireEntries(segment, now);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

                .build();
    
        cache.put(0, 10);
        cache.put(2, 30);
    
        fakeTicker.advance(999, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
        fakeTicker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
        fakeTicker.advance(1000, TimeUnit.MILLISECONDS);
        assertEquals(null, cache.getIfPresent(0));
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheRefreshTest.java

        cache.asMap().put(1, -1);
        ticker.advance(1, MILLISECONDS);
        assertEquals(Integer.valueOf(1), cache.getUnchecked(0));
        assertEquals(Integer.valueOf(-1), cache.getUnchecked(1));
        assertEquals(Integer.valueOf(2), cache.getUnchecked(2));
        assertEquals(expectedLoads, loader.getLoadCount());
        assertEquals(expectedReloads, loader.getReloadCount());
    
        // refresh 2
        ticker.advance(1, MILLISECONDS);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.9K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      }
    
      /**
       * Inserts element at current put position, advances, and signals. Call only when occupying
       * monitor.
       */
      private void insert(E x) {
        items[putIndex] = x;
        putIndex = inc(putIndex);
        ++count;
      }
    
      /**
       * Extracts element at current take position, advances, and signals. Call only when occupying
       * monitor.
       */
      private E extract() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/base/StopwatchJavaTimeTest.java

      private final Stopwatch stopwatch = new Stopwatch(ticker);
    
      public void testElapsed_duration() {
        stopwatch.start();
        ticker.advance(999999);
        assertEquals(Duration.ofNanos(999999), stopwatch.elapsed());
        ticker.advance(1);
        assertEquals(Duration.ofMillis(1), stopwatch.elapsed());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 1.3K bytes
    - Viewed (0)
Back to top