- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 149 for tryFind (0.04 sec)
-
android/guava-tests/test/com/google/common/collect/IterablesTest.java
} public void testTryFind() { Iterable<String> list = newArrayList("cool", "pants"); assertThat(tryFind(list, equalTo("cool"))).hasValue("cool"); assertThat(tryFind(list, equalTo("pants"))).hasValue("pants"); assertThat(tryFind(list, Predicates.alwaysTrue())).hasValue("cool"); assertThat(tryFind(list, Predicates.alwaysFalse())).isAbsent(); assertCanIterateAgain(list); } private static class TypeA {}
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 45.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/IteratorsTest.java
Iterator<String> iterator = list.iterator(); assertThat(tryFind(iterator, equalTo("cool"))).hasValue("cool"); } public void testTryFind_lastElement() { Iterable<String> list = Lists.newArrayList("cool", "pants"); Iterator<String> iterator = list.iterator(); assertThat(tryFind(iterator, equalTo("pants"))).hasValue("pants"); } public void testTryFind_alwaysTrue() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 56.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterables.java
* * <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()} * * @since 11.0 */ public static <T> Optional<T> tryFind(Iterable<T> iterable, Predicate<? super T> predicate) { return Iterators.tryFind(iterable.iterator(), predicate); } /** * Returns the index in {@code iterable} of the first element that satisfies the provided {@codeRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 16 18:35:28 UTC 2025 - 43.8K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterables.java
* * <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()} * * @since 11.0 */ public static <T> Optional<T> tryFind(Iterable<T> iterable, Predicate<? super T> predicate) { return Iterators.tryFind(iterable.iterator(), predicate); } /** * Returns the index in {@code iterable} of the first element that satisfies the provided {@codeRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Nov 17 22:50:48 UTC 2025 - 43.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterators.java
* will be left exhausted: its {@code hasNext()} method will return {@code false}. If it is * possible that <i>no</i> element will match, use {@link #tryFind} or {@link #find(Iterator, * Predicate, Object)} instead. * * @throws NoSuchElementException if no element in {@code iterator} matches the given predicate */ @ParametricNullnessRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 16 12:42:11 UTC 2025 - 51.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/FluentIterable.java
*/ public final Optional<@NonNull E> firstMatch(Predicate<? super E> predicate) { // Unsafe, but we can't do much about it now. return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate); } /** * Returns a fluent iterable that applies {@code function} to each element of this fluent * iterable. *
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Sep 22 18:35:44 UTC 2025 - 34.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Interners.java
return result; } } // didn't see it, trying to put it instead... Dummy sneaky = map.putIfAbsent(sample, Dummy.VALUE); if (sneaky == null) { return sample; } else { /* Someone beat us to it! Trying again... * * Technically this loop not guaranteed to terminate, so theoretically (extremelyRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 6K bytes - Viewed (0) -
guava/src/com/google/common/collect/Interners.java
return result; } } // didn't see it, trying to put it instead... Dummy sneaky = map.putIfAbsent(sample, Dummy.VALUE); if (sneaky == null) { return sample; } else { /* Someone beat us to it! Trying again... * * Technically this loop not guaranteed to terminate, so theoretically (extremelyRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 6K bytes - Viewed (0) -
internal/kms/errors.go
} // ErrKeyExists is an error returned by the KMS when trying to // create a key that already exists. ErrKeyExists = Error{ Code: http.StatusConflict, APICode: "kms:KeyAlreadyExists", Err: "key with given key ID already exits", } // ErrKeyNotFound is an error returned by the KMS when trying to // use a key that does not exist. ErrKeyNotFound = Error{Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Jul 16 14:03:03 UTC 2024 - 3.6K bytes - Viewed (0) -
.github/ISSUE_TEMPLATE/feature_request.md
--- name: Feature request about: Suggest an idea title: '' labels: enhancement assignees: '' --- Start by telling us what problem you’re trying to solve. Often a solution already exists!
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Dec 30 18:42:51 UTC 2018 - 350 bytes - Viewed (0)