public T get()

in src/main/java/com/spotify/futures/JoinedResults.java [45:58]


  public <T> T get(ListenableFuture<T> future) {
    Object value = futures.get(future);
    if (value == Null.INSTANCE) {
      return null;
    } else if (value == null) {
      String message = "Attempt to access future value not part of joined operation";
      throw new IllegalArgumentException(message);
    }
    // Must be of type T since futures is an identity map and future has resolved into this
    // value earlier
    @SuppressWarnings("unchecked")
    T t = (T) value;
    return t;
  }