Code example for FluentIterable

Methods: toList

0
      hosts = client.listHosts().get();
    } catch (InterruptedException | ExecutionException e) {
      throw new AssertionError("Failed to get list of Helios hosts", e);
    } 
 
    final List<String> filteredHosts = FluentIterable.from(hosts)
        .filter(containsPattern(hostFilter))
        .toList();
 
    if (filteredHosts.isEmpty()) {
      fail(format("no hosts matched the filter pattern - %s", hostFilter));
    } 
 
    final String chosenHost = pickHost(filteredHosts);
    return deploy(job, asList(chosenHost), waitPorts, prober);
  } 
 
  @VisibleForTesting 
  String pickHost(final List<String> filteredHosts) {
    final List<String> mutatedList = Lists.newArrayList(filteredHosts);
Connect your IDE to all the code out there  Get Codota for Java