Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,438 for optionals (0.24 sec)

  1. guava-tests/test/com/google/common/base/OptionalTest.java

        assertThat(Optional.presentInstances(optionals)).isEmpty();
      }
    
      public void testPresentInstances_somePresent() {
        List<Optional<String>> optionals =
            ImmutableList.of(Optional.of("a"), Optional.<String>absent(), Optional.of("c"));
        assertThat(Optional.presentInstances(optionals)).containsExactly("a", "c").inOrder();
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Optional.java

       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> this method has no equivalent in Java 8's
       * {@code Optional} class; use {@code
       * optionals.stream().filter(Optional::isPresent).map(Optional::get)} instead.
       *
       * <p><b>Java 9 users:</b> use {@code optionals.stream().flatMap(Optional::stream)} instead.
       *
       * @since 11.0 (generics widened in 13.0)
       */
      public static <T> Iterable<T> presentInstances(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/base/OptionalTest.java

        assertThat(Optional.presentInstances(optionals)).isEmpty();
      }
    
      public void testPresentInstances_somePresent() {
        List<Optional<String>> optionals =
            ImmutableList.of(Optional.of("a"), Optional.<String>absent(), Optional.of("c"));
        assertThat(Optional.presentInstances(optionals)).containsExactly("a", "c").inOrder();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

      }
    
      private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL =
          new Function<Object, Optional<?>>() {
            @Override
            public Optional<?> apply(@Nullable Object obj) {
              return Optional.fromNullable(obj);
            }
          };
    
      private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE =
          new Function<Optional<?>, @Nullable Object>() {
            @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/Optional.java

       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> this method has no equivalent in Java 8's
       * {@code Optional} class; use {@code
       * optionals.stream().filter(Optional::isPresent).map(Optional::get)} instead.
       *
       * <p><b>Java 9 users:</b> use {@code optionals.stream().flatMap(Optional::stream)} instead.
       *
       * @since 11.0 (generics widened in 13.0)
       */
      public static <T> Iterable<T> presentInstances(
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

      }
    
      private static final Function<Object, Optional<?>> NULLABLE_TO_OPTIONAL =
          new Function<Object, Optional<?>>() {
            @Override
            public Optional<?> apply(@Nullable Object obj) {
              return Optional.fromNullable(obj);
            }
          };
    
      private static final Function<Optional<?>, @Nullable Object> OPTIONAL_TO_NULLABLE =
          new Function<Optional<?>, @Nullable Object>() {
            @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  7. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirDataFlowInfoProvider.kt

    import org.jetbrains.kotlin.psi.psiUtil.parentsWithSelf
    import org.jetbrains.kotlin.utils.exceptions.errorWithAttachment
    import org.jetbrains.kotlin.utils.exceptions.withPsiEntry
    import java.util.Optional
    import kotlin.collections.ArrayList
    import kotlin.jvm.optionals.getOrNull
    import kotlin.math.sign
    
    @OptIn(KtAnalysisNonPublicApi::class)
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Tue Apr 16 06:40:43 GMT 2024
    - 22.9K bytes
    - Viewed (0)
  8. istioctl/cmd/options.go

    	retval := &cobra.Command{
    		Use:   "options",
    		Short: "Displays istioctl global options",
    		Args:  cobra.ExactArgs(0),
    	}
    
    	retval.SetHelpFunc(func(c *cobra.Command, args []string) {
    		c.Printf("The following options can be passed to any command:\n")
    		// (Currently the only global options we show are help options)
    		rootCmd.PersistentFlags().VisitAll(func(flag *pflag.Flag) {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  9. istioctl/pkg/multicluster/options.go

    import (
    	"k8s.io/client-go/tools/clientcmd"
    
    	"istio.io/istio/istioctl/pkg/cli"
    )
    
    const (
    	clusterNameAnnotationKey = "networking.istio.io/cluster"
    )
    
    // KubeOptions contains kubernetes options common to all commands.
    type KubeOptions struct {
    	Kubeconfig string
    	Context    string
    	Namespace  string
    }
    
    // Inherit the common kubernetes flags defined in the root package. This is a bit of a hack,
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Aug 01 23:59:49 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  10. istioctl/cmd/options_test.go

    func TestLogHelp(t *testing.T) {
    	var out bytes.Buffer
    	rootCmd := GetRootCmd([]string{"options"})
    	rootCmd.SetOut(&out)
    	rootCmd.SetErr(&out)
    
    	fErr := rootCmd.Execute()
    	if fErr != nil {
    		t.Fatalf("options failed with %v and %q\n", fErr, out.String())
    	}
    	if !regexp.MustCompile(expectedOutput).Match(out.Bytes()) {
    		t.Fatalf("'istioctl options' expected output\n%s\n  got\n%s",
    			expectedOutput, out.String())
    	}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Sep 14 02:38:54 GMT 2022
    - 1.9K bytes
    - Viewed (0)
Back to top