@Test public void linkedContinuation() throws CheckedFutureException { Promise<Integer> p1 = Promise.apply(); Promise<Integer> p2 = Promise.apply(); @SuppressWarnings("unchecked") Continuation<Integer, Integer> c = (Continuation<Integer, Integer>) p1.map(i -> i + 1); c.become(p2); Future<Integer> f = p2.map(i -> i + 1); p2.setValue(1); assertEquals(new Integer(1), get(p2)); assertEquals(new Integer(2), get(f)); }
public LinkedContinuation(final Continuation<T, R> continuation) { super(); this.continuation = continuation; }
LinkedContinuation { public LinkedContinuation(final Continuation<T, R> continuation) { super(); this.continuation = continuation; } }
LinkedContinuation { public LinkedContinuation(final Continuation<T, R> continuation) { super(); this.continuation = continuation; } LinkedContinuation(final Continuation<T, R> continuation); }
LinkedContinuation { public LinkedContinuation(final Continuation<T, R> continuation) { super(); this.continuation = continuation; } LinkedContinuation(final Continuation<T, R> continuation); boolean isDefined(); final void raise(final Throwable ex); final boolean becomeIfEmpty(final Future<R> result); final WaitQueue<R> safeFlush(final Future<R> result); @Override final String toString(); }
LinkedContinuation { public LinkedContinuation(final Continuation<T, R> continuation) { super(); this.continuation = continuation; } LinkedContinuation(final Continuation<T, R> continuation); boolean isDefined(); final void raise(final Throwable ex); final boolean becomeIfEmpty(final Future<R> result); final WaitQueue<R> safeFlush(final Future<R> result); @Override final String toString();  }