Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for removeMin (0.15 sec)

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

            newTop.right = right.removeMin(newTop);
            newTop.left = left;
            newTop.distinctElements = distinctElements - 1;
            newTop.totalCount = totalCount - oldElemCount;
            return newTop.rebalance();
          }
        }
    
        // Removes the minimum node from this subtree to be reused elsewhere
        @CheckForNull
        private AvlNode<E> removeMin(AvlNode<E> node) {
          if (left == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/TreeMultiset.java

            newTop.right = right.removeMin(newTop);
            newTop.left = left;
            newTop.distinctElements = distinctElements - 1;
            newTop.totalCount = totalCount - oldElemCount;
            return newTop.rebalance();
          }
        }
    
        // Removes the minimum node from this subtree to be reused elsewhere
        @CheckForNull
        private AvlNode<E> removeMin(AvlNode<E> node) {
          if (left == null) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        assertTrue(
            removeIf(
                list,
                new Predicate<String>() {
                  @Override
                  public boolean apply(String s) {
                    return s.equals("b") || s.equals("d") || s.equals("f");
                  }
                }));
        assertEquals(newArrayList("a", "c", "e"), list);
        assertFalse(
            removeIf(
                list,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 19:12:33 UTC 2024
    - 45K bytes
    - Viewed (0)
  4. guava/src/com/google/common/collect/Collections2.java

          return removeIf(collection::contains);
        }
    
        @Override
        public boolean retainAll(final Collection<?> collection) {
          return removeIf(element -> !collection.contains(element));
        }
    
        @Override
        public boolean removeIf(java.util.function.Predicate<? super E> filter) {
          checkNotNull(filter);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/Lists.java

            T transform(@ParametricNullness F from) {
              return function.apply(from);
            }
          };
        }
    
        @Override
        public boolean removeIf(Predicate<? super T> filter) {
          checkNotNull(filter);
          return fromList.removeIf(element -> filter.test(function.apply(element)));
        }
    
        private static final long serialVersionUID = 0;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 43.1K bytes
    - Viewed (0)
  6. guava-testlib/test/com/google/common/collect/testing/MapTestSuiteBuilderTests.java

                      return map.entrySet().remove(o);
                    }
    
                    @Override
                    public boolean removeIf(Predicate<? super Entry<String, String>> filter) {
                      return map.entrySet().removeIf(filter);
                    }
    
                    @Override
                    public boolean containsAll(Collection<?> c) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Iterables.java

       */
      @CanIgnoreReturnValue
      public static <T extends @Nullable Object> boolean removeIf(
          Iterable<T> removeFrom, Predicate<? super T> predicate) {
        if (removeFrom instanceof RandomAccess && removeFrom instanceof List) {
          return removeIfFromRandomAccessList((List<T>) removeFrom, checkNotNull(predicate));
        }
        return Iterators.removeIf(removeFrom.iterator(), predicate);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 24 19:38:27 UTC 2024
    - 42.8K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java

        } catch (UnsupportedOperationException expected) {
        }
        assertCollectionsAreEquivalent(multiset, copy);
    
        try {
          multiset.removeIf(x -> false);
          fail("removeIf(Predicate) succeeded on unmodifiable collection");
        } catch (UnsupportedOperationException expected) {
        }
        assertCollectionsAreEquivalent(multiset, copy);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       *
       * <p>This method is not atomic: the map may be visible in intermediate states, where some of the
       * zero values have been removed and others have not.
       */
      public void removeAllZeros() {
        map.values().removeIf(x -> x == 0);
      }
    
      /**
       * Returns the sum of all values in this map.
       *
       * <p>This method is not atomic: the sum may or may not include other concurrent operations.
       */
      public long sum() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

     * limitations under the License.
     */
    
    package com.google.common.collect;
    
    import static com.google.common.base.Predicates.equalTo;
    import static com.google.common.collect.Iterables.removeIf;
    import static com.google.common.collect.Lists.newArrayList;
    import static com.google.common.collect.Maps.immutableEntry;
    import static com.google.common.collect.ReflectionFreeAssertThrows.assertThrows;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 30.4K bytes
    - Viewed (0)
Back to top