Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 25 of 25 for removeMin (0.1 sec)

  1. android/guava-tests/test/com/google/common/collect/IteratorsTest.java

        assertEquals(newArrayList("a", "c", "e"), list);
      }
    
      public void testRemoveIf() {
        List<String> list = newArrayList("a", "b", "c", "d", "e");
        assertTrue(
            Iterators.removeIf(
                list.iterator(),
                new Predicate<String>() {
                  @Override
                  public boolean apply(String s) {
                    return s.equals("b") || s.equals("d") || s.equals("f");
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 54.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/LocalCacheTest.java

        LocalCache<Integer, Integer> map =
            makeLocalCache(createCacheBuilder().concurrencyLevel(1).initialCapacity(1));
        map.put(1, 1);
        map.put(2, 1);
        map.put(3, 1);
        map.entrySet()
            .removeIf(
                entry -> {
                  if (entry.getValue().equals(1)) {
                    map.put(entry.getKey(), 2);
                    return true;
                  } else {
                    return false;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 112.3K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Synchronized.java

          synchronized (mutex) {
            return delegate().retainAll(c);
          }
        }
    
        @Override
        public boolean removeIf(Predicate<? super E> filter) {
          synchronized (mutex) {
            return delegate().removeIf(filter);
          }
        }
    
        @Override
        public int size() {
          synchronized (mutex) {
            return delegate().size();
          }
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 57.2K bytes
    - Viewed (0)
  4. guava/src/com/google/common/cache/LocalCache.java

        }
    
        @Override
        public Iterator<V> iterator() {
          return new ValueIterator();
        }
    
        @Override
        public boolean removeIf(Predicate<? super V> filter) {
          checkNotNull(filter);
          return LocalCache.this.removeIf((k, v) -> filter.test(v));
        }
    
        @Override
        public boolean contains(Object o) {
          return LocalCache.this.containsValue(o);
        }
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 149.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Iterators.java

       * @return {@code true} if any elements were removed from the iterator
       * @since 2.0
       */
      @CanIgnoreReturnValue
      public static <T extends @Nullable Object> boolean removeIf(
          Iterator<T> removeFrom, Predicate<? super T> predicate) {
        checkNotNull(predicate);
        boolean modified = false;
        while (removeFrom.hasNext()) {
          if (predicate.apply(removeFrom.next())) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 50.3K bytes
    - Viewed (0)
Back to top