Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 168 for clear_ (0.17 sec)

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

          size -= oldCount;
        } else {
          backingMap.setValue(entryIndex, newCount);
          size += newCount - oldCount;
        }
        return true;
      }
    
      @Override
      public final void clear() {
        backingMap.clear();
        size = 0;
      }
    
      /**
       * Skeleton of per-entry iterators. We could push this down and win a few bytes, but it's complex
       * enough it's not especially worth it.
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/TearDownStack.java

      public final void runTearDown() {
        List<Throwable> exceptions = new ArrayList<>();
        List<TearDown> stackCopy;
        synchronized (stack) {
          stackCopy = Lists.newArrayList(stack);
          stack.clear();
        }
        for (TearDown tearDown : stackCopy) {
          try {
            tearDown.tearDown();
          } catch (Throwable t) {
            if (suppressThrows) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 19:22:18 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
      int timeUncontendedExecute(int reps) {
        final Executor executor = this.executor;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/MoreExecutorsDirectExecutorBenchmark.java

              };
          threads.add(thread);
        }
      }
    
      @AfterExperiment
      void after() {
        for (Thread thread : threads) {
          thread.interrupt(); // try to get them to exit
        }
        threads.clear();
      }
    
      @Footprint
      Object measureSize() {
        return executor;
      }
    
      @Benchmark
      int timeUncontendedExecute(int reps) {
        final Executor executor = this.executor;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/AbstractByteHasher.java

      @CanIgnoreReturnValue
      private Hasher update(int bytes) {
        try {
          update(scratch.array(), 0, bytes);
        } finally {
          Java8Compatibility.clear(scratch);
        }
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putByte(byte b) {
        update(b);
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.5K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/ForwardingQueueTest.java

          return backingQueue;
        }
    
        @Override
        public boolean addAll(Collection<? extends T> collection) {
          return standardAddAll(collection);
        }
    
        @Override
        public void clear() {
          standardClear();
        }
    
        @Override
        public boolean contains(Object object) {
          return standardContains(object);
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/collect/testing/MinimalCollection.java

        throw up();
      }
    
      @Override
      public boolean retainAll(Collection<?> elementsToRetain) {
        throw up();
      }
    
      @Override
      public void clear() {
        throw up();
      }
    
      private static UnsupportedOperationException up() {
        throw new UnsupportedOperationException();
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/collect/testing/google/MultimapAsMapGetTester.java

      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require(SUPPORTS_REMOVE)
      public void testPropagatesClearToMultimap() {
        Collection<V> result = multimap().asMap().get(k0());
        result.clear();
        assertGet(k0());
        assertEmpty(result);
      }
    
      @CollectionSize.Require(absent = ZERO)
      @MapFeature.Require({SUPPORTS_PUT, ALLOWS_NULL_VALUES})
      public void testAddNullValue() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 09 20:10:38 GMT 2018
    - 5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/EvictingQueue.java

        return true;
      }
    
      @Override
      @CanIgnoreReturnValue
      public boolean addAll(Collection<? extends E> collection) {
        int size = collection.size();
        if (size >= maxSize) {
          clear();
          return Iterables.addAll(this, Iterables.skip(collection, size - maxSize));
        }
        return standardAddAll(collection);
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 17:52:55 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/ArrayListMultimapTest.java

        assertThat(multimap.get("foo")).containsExactly(1, 2, 3, 4, 5).inOrder();
        List<Integer> sublist = list.subList(0, 5);
        assertThat(sublist).containsExactly(1, 2, 3, 4, 5).inOrder();
    
        sublist.clear();
        assertTrue(sublist.isEmpty());
        multimap.put("foo", 6);
    
        try {
          sublist.isEmpty();
          fail("Expected ConcurrentModificationException");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 6.6K bytes
    - Viewed (0)
Back to top