MCPcopy Create free account
hub / github.com/traneio/future / map

Method map

future-java/src/test/java/io/trane/future/PromiseTest.java:787–794  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

785 }
786
787 @Test
788 public void map() throws CheckedFutureException {
789 Promise<Integer> p = Promise.apply();
790 Future<Integer> f = p.map(i -> i + 1);
791 p.setValue(1);
792 assertEquals(new Integer(1), get(p));
793 assertEquals(new Integer(2), get(f));
794 }
795
796 @Test
797 public void mapInterrupt() {

Callers

nothing calls this directly

Calls 4

applyMethod · 0.95
getMethod · 0.95
mapMethod · 0.65
setValueMethod · 0.45

Tested by

no test coverage detected