Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 331 for toOptional (0.11 sec)

  1. guava-tests/test/com/google/common/collect/MoreCollectorsTest.java

        assertThat(Stream.empty().collect(toOptional())).isEmpty();
      }
    
      public void testToOptionalSingleton() {
        assertThat(Stream.of(1).collect(toOptional())).hasValue(1);
      }
    
      public void testToOptionalNull() {
        Stream<@Nullable Object> stream = Stream.of((Object) null);
        assertThrows(NullPointerException.class, () -> stream.collect(toOptional()));
      }
    
      public void testToOptionalMultiple() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 20:24:49 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/MoreCollectors.java

       * @return {@code Optional.of(onlyElement)} if the stream has exactly one element (must not be
       *     {@code null}) and returns {@code Optional.empty()} if it has none.
       */
      @SuppressWarnings("unchecked")
      public static <T> Collector<T, ?, Optional<T>> toOptional() {
        return (Collector) TO_OPTIONAL;
      }
    
      private static final Object NULL_PLACEHOLDER = new Object();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 21:21:17 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Optional.java

     */
    @DoNotMock("Use Optional.of(value) or Optional.absent()")
    @GwtCompatible(serializable = true)
    @ElementTypesAreNonnullByDefault
    public abstract class Optional<T> implements Serializable {
      /**
       * Returns an {@code Optional} instance with no contained reference.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's
       * {@code Optional.empty}.
       */
      public static <T> Optional<T> absent() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      public void testToJavaUtil_instance() {
        assertEquals(java.util.Optional.empty(), Optional.absent().toJavaUtil());
        assertEquals(java.util.Optional.of("abc"), Optional.of("abc").toJavaUtil());
      }
    
      @SuppressWarnings("NullOptional")
      public void testFromJavaUtil() {
        assertNull(Optional.fromJavaUtil(null));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. api/maven-api-cli/src/main/java/org/apache/maven/api/cli/Options.java

         *
         * @return an {@link Optional} containing the map of user properties, or empty if not set
         */
        @Nonnull
        Optional<Map<String, String>> userProperties();
    
        /**
         * Indicates whether to show the version information and exit.
         *
         * @return an {@link Optional} containing the boolean flag, or empty if not set
         */
        @Nonnull
        Optional<Boolean> showVersionAndExit();
    
        /**
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Tue Oct 22 14:53:58 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. fastapi/params.py

            serialization_alias: Union[str, None] = None,
            title: Optional[str] = None,
            description: Optional[str] = None,
            gt: Optional[float] = None,
            ge: Optional[float] = None,
            lt: Optional[float] = None,
            le: Optional[float] = None,
            min_length: Optional[int] = None,
            max_length: Optional[int] = None,
            pattern: Optional[str] = None,
            regex: Annotated[
                Optional[str],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 18:06:20 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  7. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/CommonsCliMavenOptions.java

            }
            return Optional.empty();
        }
    
        @Override
        public Optional<Boolean> nonRecursive() {
            if (commandLine.hasOption(CLIManager.NON_RECURSIVE)) {
                return Optional.of(Boolean.TRUE);
            }
            return Optional.empty();
        }
    
        @Override
        public Optional<Boolean> updateSnapshots() {
            if (commandLine.hasOption(CLIManager.UPDATE_SNAPSHOTS)) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 16K bytes
    - Viewed (0)
  8. internal/config/notify/help.go

    			Optional:    true,
    			Type:        "string",
    			Sensitive:   true,
    			Secret:      true,
    		},
    		config.HelpKV{
    			Key:         target.WebhookQueueDir,
    			Description: queueDirComment,
    			Optional:    true,
    			Type:        "path",
    		},
    		config.HelpKV{
    			Key:         target.WebhookQueueLimit,
    			Description: queueLimitComment,
    			Optional:    true,
    			Type:        "number",
    		},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  9. internal/logger/help.go

    			Optional:    true,
    			Type:        "string",
    			Sensitive:   true,
    		},
    		config.HelpKV{
    			Key:         BatchSize,
    			Description: "Number of events per HTTP send to webhook target",
    			Optional:    true,
    			Type:        "number",
    		},
    		config.HelpKV{
    			Key:         QueueSize,
    			Description: "configure channel queue size for webhook targets",
    			Optional:    true,
    			Type:        "number",
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 11 22:20:42 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  10. fastapi/dependencies/models.py

        name: Optional[str] = None
        call: Optional[Callable[..., Any]] = None
        request_param_name: Optional[str] = None
        websocket_param_name: Optional[str] = None
        http_connection_param_name: Optional[str] = None
        response_param_name: Optional[str] = None
        background_tasks_param_name: Optional[str] = None
        security_scopes_param_name: Optional[str] = None
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 31 20:19:30 UTC 2024
    - 1.5K bytes
    - Viewed (0)
Back to top