コード例 #1
0
 /**
  * Supplies the value to be returned by each poll.
  *
  * <p>Note this <em>must</em> use generics, otherwise the return type of subsequent chained calls
  * will (e.g. to {@link FeedConfig#onException(com.google.common.base.Function)} will return the
  * wrong type.
  */
 @SuppressWarnings("unchecked")
 public <newS> FunctionPollConfig<newS, T> supplier(final Supplier<? extends newS> val) {
   this.callable = Functionals.callable(checkNotNull(val, "supplier"));
   return (FunctionPollConfig<newS, T>) this;
 }