- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for orNull (0.03 sec)
-
android/guava/src/com/google/common/base/Absent.java
} @Override public T or(Supplier<? extends T> supplier) { return checkNotNull( supplier.get(), "use Optional.orNull() instead of a Supplier that returns null"); } @Override public @Nullable T orNull() { return null; } @Override public Set<T> asSet() { return Collections.emptySet(); } @Override public <V> Optional<V> transform(Function<? super T, V> function) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Apr 15 22:14:00 UTC 2025 - 2.6K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Present.java
public boolean isPresent() { return true; } @Override public T get() { return reference; } @Override public T or(T defaultValue) { checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); return reference; } @Override public Optional<T> or(Optional<? extends T> secondChoice) { checkNotNull(secondChoice); return this; } @Override
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Apr 15 22:14:00 UTC 2025 - 2.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Optional.java
// If users use this when they shouldn't, we hope that NewApi will catch subsequent Optional calls @IgnoreJRERequirement public java.util.Optional<T> toJavaUtil() { return java.util.Optional.ofNullable(orNull()); } Optional() {} /** * Returns {@code true} if this holder contains a (non-null) instance. * * <p><b>Comparison to {@code java.util.Optional}:</b> no differences. */
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Jun 04 13:03:16 UTC 2025 - 15.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/OptionalTest.java
} @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional public void testOrNull_present() { assertEquals("a", Optional.of("a").orNull()); } public void testOrNull_absent() { assertThat(Optional.absent().orNull()).isNull(); } public void testAsSet_present() { Set<String> expected = Collections.singleton("a"); assertEquals(expected, Optional.of("a").asSet());Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 16:03:47 UTC 2025 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/reflect/Parameter.java
*/ @Override public <A extends Annotation> @Nullable A getDeclaredAnnotation(Class<A> annotationType) { checkNotNull(annotationType); return FluentIterable.from(annotations).filter(annotationType).first().orNull(); } /** * @since 18.0 */ @Override public <A extends Annotation> A[] getDeclaredAnnotationsByType(Class<A> annotationType) { @Nullable A[] result =
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sat Jan 18 02:54:30 UTC 2025 - 4.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Jul 08 18:32:10 UTC 2025 - 8.4K bytes - Viewed (0)