- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 1,468 for removeIf (0.07 sec)
-
android/guava/src/com/google/common/collect/Iterables.java
* removeFrom.removeIf(predicate)} instead. * * @param removeFrom the iterable to (potentially) remove elements from * @param predicate a predicate that determines whether an element should be removed * @return {@code true} if any elements were removed from the iterable * @throws UnsupportedOperationException if the iterable does not support {@code remove()}. * @since 2.0 */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0) -
guava-testlib/src/com/google/common/collect/testing/google/UnmodifiableCollectionTests.java
try { multiset.remove(sampleElement, 2); fail("remove(Object, int) succeeded on unmodifiable collection"); } catch (UnsupportedOperationException expected) { } assertCollectionsAreEquivalent(multiset, copy); try { multiset.removeIf(x -> false); fail("removeIf(Predicate) succeeded on unmodifiable collection");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 14.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AtomicLongMap.java
* otherwise, this method returns false. */ boolean remove(K key, long value) { return map.remove(key, value); } /** * Atomically remove {@code key} from the map iff its associated value is 0. * * @since 20.0 */ @CanIgnoreReturnValue public boolean removeIfZero(K key) { return remove(key, 0); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/FluentIterableTest.java
FluentIterable<Integer> cycle = fluent(1, 2).cycle(); Iterator<Integer> iterator = cycle.iterator(); iterator.next(); iterator.remove(); iterator.next(); iterator.remove(); assertFalse(iterator.hasNext()); assertFalse(cycle.iterator().hasNext()); } public void testAppend() { FluentIterable<Integer> result =
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 30.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Collections2.java
} } /** * Delegates to {@link Collection#remove}. Returns {@code false} if the {@code remove} method * throws a {@code ClassCastException} or {@code NullPointerException}. */ static boolean safeRemove(Collection<?> collection, @CheckForNull Object object) { checkNotNull(collection); try { return collection.remove(object); } catch (ClassCastException | NullPointerException e) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 20:24:49 UTC 2024 - 22.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableCollection.java
* @deprecated Unsupported operation. */ @CanIgnoreReturnValue @Deprecated @Override @DoNotCall("Always throws UnsupportedOperationException") public final boolean removeIf(Predicate<? super E> filter) { throw new UnsupportedOperationException(); } /** * Guaranteed to throw an exception and leave the collection unmodified. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Aug 12 16:59:15 UTC 2024 - 18.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/IteratorsTest.java
assertTrue(cycle.hasNext()); assertThrows(IllegalStateException.class, () -> cycle.remove()); } public void testCycleRemoveSameElementTwice() { Iterator<String> cycle = Iterators.cycle("a", "b"); cycle.next(); cycle.remove(); assertThrows(IllegalStateException.class, () -> cycle.remove()); } public void testCycleWhenRemoveIsNotSupported() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 54.1K bytes - Viewed (0) -
guava/src/com/google/common/collect/Multisets.java
} @Override public void remove() { checkRemove(canRemove); if (totalCount == 1) { entryIterator.remove(); } else { /* * requireNonNull is safe because canRemove is set to true only after we initialize * currentEntry (which we never subsequently clear). */ multiset.remove(requireNonNull(currentEntry).getElement()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 41.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/IteratorsTest.java
assertTrue(cycle.hasNext()); assertThrows(IllegalStateException.class, () -> cycle.remove()); } public void testCycleRemoveSameElementTwice() { Iterator<String> cycle = Iterators.cycle("a", "b"); cycle.next(); cycle.remove(); assertThrows(IllegalStateException.class, () -> cycle.remove()); } public void testCycleWhenRemoveIsNotSupported() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 54.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
map.put(one, two); map.remove(one); assertNotified(listener, one, two, RemovalCause.EXPLICIT); map.put(two, three); map.remove(two, three); assertNotified(listener, two, three, RemovalCause.EXPLICIT); map.put(three, four); Iterator<?> i = map.entrySet().iterator(); i.next(); i.remove(); assertNotified(listener, three, four, RemovalCause.EXPLICIT);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K bytes - Viewed (0)