- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 422 for toOptional (0.06 sec)
-
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Apr 14 16:07:06 UTC 2025 - 5.6K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Apr 12 15:07:59 UTC 2025 - 5.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterables.java
* iterable is empty. * * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code * stream.collect(MoreCollectors.toOptional()).orElse(defaultValue)}. * * @throws IllegalArgumentException if the iterator contains multiple elements */ @ParametricNullness public static <T extends @Nullable Object> T getOnlyElement(
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 43.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/Iterables.java
* iterable is empty. * * <p><b>Java 8+ users:</b> the {@code Stream} equivalent to this method is {@code * stream.collect(MoreCollectors.toOptional()).orElse(defaultValue)}. * * @throws IllegalArgumentException if the iterator contains multiple elements */ @ParametricNullness public static <T extends @Nullable Object> T getOnlyElement(
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 43.3K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java
for (int i = 0; i < size; i++) { root = Optional.of(new BinaryNode(rng.nextInt(), root, Optional.<BinaryNode>absent())); } return root; } }, ALL_RIGHT { @Override Optional<BinaryNode> createTree(int size, Random rng) { Optional<BinaryNode> root = Optional.absent(); for (int i = 0; i < size; i++) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.9K bytes - Viewed (0) -
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 Sep 07 03:35:12 UTC 2025 - Last Modified: Mon Jan 13 16:14:35 UTC 2025 - 6.5K bytes - Viewed (0) -
api/maven-api-cli/src/main/java/org/apache/maven/api/cli/mvnup/UpgradeOptions.java
* * @return an {@link Optional} containing the list of goals, or empty if not specified */ @Nonnull Optional<List<String>> goals(); /** * Returns the target POM model version for upgrades. * Supported values include "4.0.0" and "4.1.0". * * @return an {@link Optional} containing the model version, or empty if not specified */ @Nonnull
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Aug 29 12:46:51 UTC 2025 - 3.6K bytes - Viewed (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyCoordinatesFactoryRequest.java
this.scope = scope; return this; } public DependencyCoordinatesFactoryRequestBuilder optional(boolean optional) { this.optional = optional; return this; } public DependencyCoordinatesFactoryRequestBuilder exclusions(Collection<Exclusion> exclusions) { if (exclusions != null) {
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Fri Jun 06 14:28:57 UTC 2025 - 12.1K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Absent.java
throw new IllegalStateException("Optional.get() cannot be called on an absent value"); } @Override public T or(T defaultValue) { return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); } @SuppressWarnings("unchecked") // safe covariant cast @Override public Optional<T> or(Optional<? extends T> secondChoice) { return (Optional<T>) checkNotNull(secondChoice); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue Apr 15 22:14:00 UTC 2025 - 2.6K bytes - Viewed (0) -
api/maven-api-cli/src/main/java/org/apache/maven/api/cli/InvokerRequest.java
*/ @Nonnull Optional<Path> rootDirectory(); /** * Returns the input stream for the Maven execution, if running in embedded mode. * * @return an {@link Optional} containing the input stream, or empty if not applicable */ @Nonnull default Optional<InputStream> stdIn() { return Optional.ofNullable(parserRequest().stdIn()); } /**
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Wed Jun 11 13:14:09 UTC 2025 - 6.7K bytes - Viewed (0)