Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for tryFind (0.06 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. .github/ISSUE_TEMPLATE/40_contributor_documentation.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:
          required: false
      - type: input
        id: page
        attributes:
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Mon Jan 15 10:01:01 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  9. compat/maven-embedder/src/main/java/org/apache/maven/cli/internal/ExtensionResolutionException.java

     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.cli.internal;
    
    import org.apache.maven.api.cli.extensions.CoreExtension;
    
    /**
     * Exception occurring trying to resolve a plugin.
     *
     */
    public class ExtensionResolutionException extends Exception {
    
        private final CoreExtension extension;
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  10. errors.go

    package gorm
    
    import (
    	"errors"
    
    	"gorm.io/gorm/logger"
    )
    
    var (
    	// ErrRecordNotFound record not found error
    	ErrRecordNotFound = logger.ErrRecordNotFound
    	// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`
    	ErrInvalidTransaction = errors.New("invalid transaction")
    	// ErrNotImplemented not implemented
    	ErrNotImplemented = errors.New("not implemented")
    	// ErrMissingWhereClause missing where clause
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Apr 26 02:53:17 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top