Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for testFromNullable (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

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

        assertEquals("training", Optional.of("training").get());
      }
    
      public void testOf_null() {
        assertThrows(NullPointerException.class, () -> Optional.of(null));
      }
    
      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
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 10.5K bytes
    - Click Count (0)
Back to Top