- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 666 for toOptional (0.09 sec)
-
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) -
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) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 24 19:38:27 UTC 2024 - 42.8K bytes - Viewed (0) -
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) -
common-protos/k8s.io/api/apps/v1beta2/generated.proto
// +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; // The reason for the condition's last transition. // +optional optional string reason = 4; // A human readable message indicating details about the transition. // +optional optional string message = 5; } // DaemonSetList is a collection of daemon sets. message DaemonSetList {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 36.4K bytes - Viewed (0) -
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) -
common-protos/k8s.io/api/authorization/v1/generated.proto
// +optional optional string version = 4; // Resource is one of the existing resource types. "*" means all. // +optional optional string resource = 5; // Subresource is one of the existing resource types. "" means none. // +optional optional string subresource = 6; // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. // +optional
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 11.9K bytes - Viewed (0) -
common-protos/k8s.io/api/extensions/v1beta1/generated.proto
// +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; // The reason for the condition's last transition. // +optional optional string reason = 4; // A human readable message indicating details about the transition. // +optional optional string message = 5; } // DaemonSetList is a collection of daemon sets. message DaemonSetList { // Standard list metadata.
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 45.6K bytes - Viewed (0) -
common-protos/k8s.io/api/autoscaling/v2/generated.proto
// +optional optional string reason = 4; // message is a human-readable explanation containing details about // the transition // +optional optional string message = 5; } // HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. message HorizontalPodAutoscalerList { // metadata is the standard list metadata. // +optional
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 21.3K bytes - Viewed (0) -
common-protos/k8s.io/api/autoscaling/v2beta1/generated.proto
// one status to another // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; // reason is the reason for the condition's last transition. // +optional optional string reason = 4; // message is a human-readable explanation containing details about // the transition // +optional optional string message = 5; }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 21.2K bytes - Viewed (0)