Used for {@link #allAsList} and {@link #successfulAsList}.
333643
private static <V> ListenableFuture<List<V>> listFuture(
      ImmutableList<ListenableFuture<? extends V>> futures,
      boolean allMustSucceed, Executor listenerExecutor) {
    return new CombinedFuture<V, List<V>>(
        futures, allMustSucceed, listenerExecutor,
        new FutureCombiner<V, List<V>>() {
          @Override
          public List<V> combine(List<Optional<V>> values) {
            List<V> result = Lists.newArrayList();
            for (Optional<V> element : values) {
              result.add(element != null ? element.orNull() : null);
            }
            return Collections.unmodifiableList(result);
          }
        });
  }
446158
function success() {

  var args = [].slice.call(arguments);
  let succesOptions = Object.assign({}, options);;
  let message = defaultMessage;

  if ( args.length ) {
    args.forEach(function(arg) {
      switch(typeof arg) {
        case 'object':
          succesOptions = Object.assign(succesOptions, arg);
        break;
        case 'string':
          message = succesOptions.messages[arg] || arg;
        break;
      }
    });
  }

  let first = true;
  let logType = "Created";
  let prefix = typeof succesOptions.prefix !== 'undefined' ? succesOptions.prefix + ' ' : '';
  let suffix = typeof succesOptions.suffix !== 'undefined' ? ' ' + succesOptions.suffix : '';

  message = prefix + message + suffix;

  if (caches.includes(message) && message !== defaultMessage) {
    logType = "Updated";
  }

  caches.push(message);

  if ( typeof succesOptions.extra !== 'undefined') {
    var extra = typeof succesOptions.extra == 'object' ? succesOptions.extra : [succesOptions.extra];
    extra.forEach(file => {
      log(logType, file, message);
    })
    succesOptions.extra = undefined;
  }

  return notify({
    icon     : _icon(),
    subtitle : succesOptions.project,
    title    : logType + " <%= file.relative %>",
    message  : (file) => {

      let filepath = path.relative(process.cwd(), file.path);

      if (typeof succesOptions.exclusions !== 'undefined' && filepath.includes(succesOptions.exclusions)) {
        return false;
      } else {
        log(logType, filepath, message);
      }

      if (first == false) { return false; }
      first = false;

      if ( options.popups ) {
        return message;
      }
    }
  });
}
1044547
public static <T> boolean verifyAllSuccessful(List<Either<T, ExecutionException>> results) {
    return Iterables.all(results, new Predicate<Either<T, ExecutionException>>() {
      @Override
      public boolean apply(@Nullable Either<T, ExecutionException> input) {
        return input instanceof Either.Left;
      }
    });
  }
994761
private static void sortMatchList(List<Match> list) {
    if (list != null) {
      // light sorting on start position
      Collections.sort(list, (Match m1,
          Match m2) -> (Integer.compare(m1.startPosition, m2.startPosition)));
    }
  }
607280
@Override
    public void succeeded() {
        boolean process = false;
        try (Locker.Lock lock = _locker.lock()) {
            switch (_state) {
                case PROCESSING: {
                    _state = State.CALLED;
                    break;
                }
                case PENDING: {
                    _state = State.PROCESSING;
                    process = true;
                    break;
                }
                case CLOSED:
                case FAILED: {
                    // Too late!
                    break;
                }
                default: {
                    throw new IllegalStateException(toString());
                }
            }
        }
        if (process)
            processing();
    }
254558
@Override
    public java.util.concurrent.Future<ListPoliciesResult> listPoliciesAsync(
            com.amazonaws.handlers.AsyncHandler<ListPoliciesRequest, ListPoliciesResult> asyncHandler) {

        return listPoliciesAsync(new ListPoliciesRequest(), asyncHandler);
    }
195777
private boolean checkMatch() {
        if (matchList == null) {
            return true;
        }
        final int matchSize = matchList.size();
        final int ancestorSize = topicIdList.size();
        final List<String> tail = topicIdList.subList(ancestorSize - matchSize, ancestorSize);
        return matchList.equals(tail);
    }
612061
@Action(name = "List Size",
            outputs = {
                    @Output(RESULT_TEXT),
                    @Output(RESPONSE),
                    @Output(RETURN_RESULT),
                    @Output(RETURN_CODE)
            },
            responses = {
                    @Response(text = Constants.ResponseNames.SUCCESS, field = RETURN_CODE, value = RETURN_CODE_SUCCESS, matchType = MatchType.COMPARE_EQUAL),
                    @Response(text = Constants.ResponseNames.FAILURE, field = RETURN_CODE, value = RETURN_CODE_FAILURE, matchType = MatchType.COMPARE_EQUAL, isOnFail = true, isDefault = true)
            })
    public Map<String, String> getListSize(@Param(value = LIST, required = true) String list,
                                           @Param(value = DELIMITER, required = true) String delimiter) {
        Map<String, String> result = new HashMap<>();
        try {
            String[] table = ListProcessor.toArray(list, delimiter);
            result.put(RESULT_TEXT, String.valueOf(table.length));
            result.put(RESPONSE, Constants.ResponseNames.SUCCESS);
            result.put(RETURN_RESULT, String.valueOf(table.length));
            result.put(RETURN_CODE, RETURN_CODE_SUCCESS);
        } catch (Exception e) {
            result.put(RESULT_TEXT, e.getMessage());
            result.put(RESPONSE, Constants.ResponseNames.FAILURE);
            result.put(RETURN_RESULT, e.getMessage());
            result.put(RETURN_CODE, RETURN_CODE_FAILURE);
        }
        return result;
    }
1190812
public void setSuccessfulSet(java.util.Collection<EventDetails> successfulSet) {
        if (successfulSet == null) {
            this.successfulSet = null;
            return;
        }

        this.successfulSet = new java.util.ArrayList<EventDetails>(successfulSet);
    }
1006728
@Private
  @Override
  public void completed(final int taskletId, final TOutput result) {
    try {
      completedTasklets(result, Collections.singletonList(taskletId));
    } catch (final InterruptedException e) {
      throw new RuntimeException(e);
    }
  }
1077070
@Override
    public java.util.concurrent.Future<ListAccessKeysResult> listAccessKeysAsync(
            com.amazonaws.handlers.AsyncHandler<ListAccessKeysRequest, ListAccessKeysResult> asyncHandler) {

        return listAccessKeysAsync(new ListAccessKeysRequest(), asyncHandler);
    }
270099
public static <T> IQueryResult<T> packageResult(List<T> results, CompletionStatus status) {
        return packageResult(results, status, null);
    }
1326105
@SuppressWarnings("unchecked")
    private E nextLazy() {
        //noinspection unchecked
        List<Emit<SqlgElement>> result = this.elements;
        this.elements = null;
        return (E) result;
    }
78904
public synchronized boolean complete(Response result) {
        if (completed) {
            return false;
        }
        completed = true;
        this.result = result;
        notifyAll();
        return true;
    }
961897
private List<ScoredHost> scoreMatches(final List<String> results) {
    final ImmutableList.Builder<ScoredHost> scored = ImmutableList.builder();
    for (final String name : results) {
      int score = Integer.MAX_VALUE;
      for (int i = 0; i < searchPath.length; i++) {
        if (name.endsWith(searchPath[i].toString())) {
          if (i < score) {
            score = i;
          }
        }
      }
      scored.add(new ScoredHost(name, score));
    }
    return scored.build();
  }
1197316
public void setSucceeded(java.util.Collection<String> succeeded) {
        if (succeeded == null) {
            this.succeeded = null;
            return;
        }

        this.succeeded = new java.util.ArrayList<String>(succeeded);
    }
141263
public static void addToListIfNotExists(List<String> list, String value) {
        boolean found = false;
        for (String item : list) {
            if (item.equalsIgnoreCase(value)) {
                found = true;
                break;
            }
        }
        if (!found) {
            list.add(value);
        }
    }