- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for testAsSet_absentIsImmutable (0.15 sec)
-
guava-tests/test/com/google/common/base/OptionalTest.java
public void testAsSet_presentIsImmutable() { Set<String> presentAsSet = Optional.of("a").asSet(); assertThrows(UnsupportedOperationException.class, () -> presentAsSet.add("b")); } public void testAsSet_absentIsImmutable() { Set<Object> absentAsSet = Optional.absent().asSet(); assertThrows(UnsupportedOperationException.class, () -> absentAsSet.add("foo")); } public void testTransform_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)