- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for testAsSet_presentIsImmutable (0.36 sec)
-
guava-tests/test/com/google/common/base/OptionalTest.java
assertEquals(expected, Optional.of("a").asSet()); } public void testAsSet_absent() { assertTrue("Returned set should be empty", Optional.absent().asSet().isEmpty()); } public void testAsSet_presentIsImmutable() { Set<String> presentAsSet = Optional.of("a").asSet(); try { presentAsSet.add("b"); fail(); } catch (UnsupportedOperationException expected) { } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 21 18:32:41 UTC 2024 - 11.2K bytes - Viewed (0)