- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 132 for tryFind (0.09 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 54.1K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 19:12:33 UTC 2024 - 45K bytes - Viewed (0) -
android/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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 54.1K 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 {@code
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0) -
android/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 */ @ParametricNullness
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 50.3K bytes - Viewed (0) -
android/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 Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 24 13:42:31 UTC 2024 - 35.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 (extremely
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 5.9K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 16 14:03:03 UTC 2024 - 3.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 (extremely
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Mar 13 14:30:51 UTC 2023 - 5.9K bytes - Viewed (0) -
.github/ISSUE_TEMPLATE/50_maintainer_chore.yml
validations: required: true - type: textarea id: context attributes: label: Context (optional) description: | How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world validations:
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Tue Sep 12 11:52:53 UTC 2023 - 856 bytes - Viewed (0)