Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Bob (2.33 sec)

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

        try {
          Optional.of(null);
          fail();
        } catch (NullPointerException expected) {
        }
      }
    
      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));
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 21 18:32:41 UTC 2024
    - 11.2K bytes
    - Viewed (0)
Back to top