- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for fromNullable (0.1 sec)
-
guava-tests/test/com/google/common/base/OptionalTest.java
} public void testFromNullable() { Optional<String> optionalName = Optional.fromNullable("bob"); assertEquals("bob", optionalName.get()); } public void testFromNullable_null() { // not promised by spec, but easier to test assertSame(Optional.absent(), Optional.fromNullable(null)); } public void testIsPresent_no() { assertFalse(Optional.absent().isPresent()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Optional.java
return Absent.withType(); } /** * Returns an {@code Optional} instance containing the given non-null reference. To have {@code * null} treated as {@link #absent}, use {@link #fromNullable} instead. * * <p><b>Comparison to {@code java.util.Optional}:</b> no differences. * * @throws NullPointerException if {@code reference} is null */ public static <T> Optional<T> of(T reference) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 15.4K bytes - Viewed (0) -
android/guava/src/com/google/common/net/InternetDomainName.java
if (i > 0 && matchesType( desiredType, Optional.fromNullable(PublicSuffixPatterns.UNDER.get(ancestorName)))) { return i - 1; } if (matchesType( desiredType, Optional.fromNullable(PublicSuffixPatterns.EXACT.get(ancestorName)))) { return i; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 05 20:47:23 UTC 2024 - 28K bytes - Viewed (0) -
guava/src/com/google/common/net/InternetDomainName.java
if (i > 0 && matchesType( desiredType, Optional.fromNullable(PublicSuffixPatterns.UNDER.get(ancestorName)))) { return i - 1; } if (matchesType( desiredType, Optional.fromNullable(PublicSuffixPatterns.EXACT.get(ancestorName)))) { return i; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Feb 05 20:47:23 UTC 2024 - 28K bytes - Viewed (0)