@Test public void collectEmpty() { Future<List<String>> future = Future.collect(new ArrayList<>()); assertEquals(Future.emptyList(), future); }
@SuppressWarnings("unchecked") public final void collect(final T value, final int i) { results[i] = value; if (count.decrementAndGet() == 0) setValue((List<T>) Arrays.asList(results)); }
CollectPromise extends Promise<List<T>> { @SuppressWarnings("unchecked") public final void collect(final T value, final int i) { results[i] = value; if (count.decrementAndGet() == 0) setValue((List<T>) Arrays.asList(results)); } }
CollectPromise extends Promise<List<T>> { @SuppressWarnings("unchecked") public final void collect(final T value, final int i) { results[i] = value; if (count.decrementAndGet() == 0) setValue((List<T>) Arrays.asList(results)); } CollectPromise(final List<? extends Future<T>> list); }
CollectPromise extends Promise<List<T>> { @SuppressWarnings("unchecked") public final void collect(final T value, final int i) { results[i] = value; if (count.decrementAndGet() == 0) setValue((List<T>) Arrays.asList(results)); } CollectPromise(final List<? extends Future<T>> list); @SuppressWarnings("unchecked") final void collect(final T value, final int i); }
CollectPromise extends Promise<List<T>> { @SuppressWarnings("unchecked") public final void collect(final T value, final int i) { results[i] = value; if (count.decrementAndGet() == 0) setValue((List<T>) Arrays.asList(results)); } CollectPromise(final List<? extends Future<T>> list); @SuppressWarnings("unchecked") final void collect(final T value, final int i);  }