Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for tryFind (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
  4. cmd/prepare-storage.go

    	// is invalid. This function returns success for the
    	// most part unless one of the formats is not consistent
    	// with expected Erasure format. For example if a user is
    	// trying to pool FS backend into an Erasure set.
    	if err = checkFormatErasureValues(formatConfigs, storageDisks, setDriveCount); err != nil {
    		return nil, err
    	}
    
    	// All disks report unformatted we should initialized everyone.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 11.1K bytes
    - Viewed (1)
  5. compat/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java

            } else if (artifact.isSnapshot() || !artifact.getFile().exists()) {
                if (force || updateCheckManager.isUpdateRequired(artifact, repository)) {
                    logger.debug("Trying repository " + repository.getId() + " for resolution of " + artifact.getId()
                            + " from " + remotePath);
    
                    try {
                        getRemoteFile(
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 29.9K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb/SmbTreeConnection.java

                        return new SmbTreeHandleImpl(loc, this);
                    }
                }
                catch ( IOException e ) {
                    last = e;
                    log.debug("Referral failed, trying next", e);
                }
    
                if ( dr != null ) {
                    dr = dr.next();
                }
            }
            while ( dr != start );
            throw last;
        }
    
    
        /**
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Tue Jul 07 10:50:16 UTC 2020
    - 31K bytes
    - Viewed (0)
  7. internal/rest/client.go

    	// Calling this returns true or false if the target
    	// is online or offline.
    	HealthCheckFn func() bool
    
    	// HealthCheckRetryUnit will be used to calculate the exponential
    	// backoff when trying to reconnect to an offline node
    	HealthCheckReconnectUnit time.Duration
    
    	// HealthCheckTimeout determines timeout for each call.
    	HealthCheckTimeout time.Duration
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 26 12:55:01 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbTransportPoolImpl.java

                    }
                }
            }
    
            IOException ex = null;
            for ( Address addr : addrs ) {
                if ( log.isDebugEnabled() ) {
                    log.debug("Trying address {}", addr);
                }
                try ( SmbTransportImpl trans = getSmbTransport(tf, addr, port, exclusive, forceSigning).unwrap(SmbTransportImpl.class) ) {
                    try {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Dec 20 14:09:34 UTC 2020
    - 12.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

        if (e is InterruptedIOException) {
          return e is SocketTimeoutException && !requestSendStarted
        }
    
        // Look for known client-side or negotiation errors that are unlikely to be fixed by trying
        // again with a different route.
        if (e is SSLHandshakeException) {
          // If the problem was a CertificateException from the X509TrustManager,
          // do not retry.
          if (e.cause is CertificateException) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:24:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  10. tensorflow/c/eager/parallel_device/parallel_device.cc

                                           TFE_TensorHandle* tensor,
                                           TF_Status* status, void* device_info) {
      TF_SetStatus(
          status, TF_UNIMPLEMENTED,
          absl::StrCat("Trying to copy a tensor ",
                       tensorflow::unwrap(tensor)->DebugString(),
                       " on to a parallel device. Pack non-parallel "
                       "tensors for each device into a parallel tensor explicitly.")
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Mon Oct 21 04:14:14 UTC 2024
    - 18.3K bytes
    - Viewed (0)
Back to top