Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for fromJavaUtil (0.15 sec)

  1. guava-tests/test/com/google/common/base/OptionalTest.java

      }
    
      @SuppressWarnings("NullOptional")
      public void testFromJavaUtil() {
        assertNull(Optional.fromJavaUtil(null));
        assertEquals(Optional.absent(), Optional.fromJavaUtil(java.util.Optional.empty()));
        assertEquals(Optional.of("abc"), Optional.fromJavaUtil(java.util.Optional.of("abc")));
      }
    
      public void testAbsent() {
        Optional<String> optionalName = Optional.absent();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Optional.java

       */
      @SuppressWarnings("Java7ApiChecker")
      @IgnoreJRERequirement // Users will use this only if they're already using Optional.
      @CheckForNull
      public static <T> Optional<T> fromJavaUtil(@CheckForNull java.util.Optional<T> javaUtilOptional) {
        return (javaUtilOptional == null) ? null : fromNullable(javaUtilOptional.orElse(null));
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top