<p>toRows.</p>

@param responses a {@link java.lang.Iterable} object.
@return a {@link java.util.List} object.
771817
public static List<FlatRow> toRows(Iterable<ReadRowsResponse> responses) {
    final ArrayList<FlatRow> result = new ArrayList<>();
    RowMerger rowMerger = new RowMerger(new StreamObserver<FlatRow>() {
      @Override
      public void onNext(FlatRow value) {
        result.add(value);
      }

      @Override
      public void onError(Throwable t) {
        if (t instanceof RuntimeException) {
          throw (RuntimeException) t;
        } else {
          throw new IllegalStateException(t);
        }
      }

      @Override
      public void onCompleted() {
      }
    });
    for (ReadRowsResponse response : responses) {
      rowMerger.onNext(response);
    }
    rowMerger.onCompleted();
    return result;
  }
510085
@Override
    public StreamObserver<HelloRequest> lotsOfGreetings(StreamObserver<HelloReply> responseObserver) {
        return new StreamObserver<HelloRequest>() {
            final ArrayList<String> names = new ArrayList<>();

            @Override
            public void onNext(HelloRequest value) {
                names.add(value.getName());
            }

            @Override
            public void onError(Throwable t) {
                responseObserver.onError(t);
            }

            @Override
            public void onCompleted() {
                responseObserver.onNext(buildReply(toMessage(String.join(", ", names))));
                responseObserver.onCompleted();
            }
        };
    }
924952
public static <INPUT extends Comparable<INPUT>> Iterable<List<INPUT>> toUniqueAndSortedPartitions(Collection<INPUT> inputs) {
    return toUniqueAndSortedPartitions(inputs, i -> i);
  }
159203
public Set<Node> getWrapperSet(Set<?> objects)
	{
		Set<Node> wrapped = new HashSet<Node>();

		for (Object object : objects)
		{
			Node node = (Node) getGraphObject(object);
			if (node != null)
			{
				wrapped.add(node);
			}
		}
		return wrapped;
	}
629880
public static <T> List<T> toList(Iterable<T> iter) {
    List<T> buf = new ArrayList<>();
    for (T v : iter) {
      buf.add(v);
    }
    return buf;
  }
429188
public List iterateObjectsToList() {
        List result = new ArrayList();
        Iterator iterator = iterateObjects();
        for (; iterator.hasNext(); ) {
            result.add(iterator.next());
        }
        return result;
    }
597314
public void setResponses(Map<String, List<Map<String, AttributeValue>>> responses) {
        this.responses = responses;
    }
23055
private static <E> List<E> toList(Iterable<E> iterable)
	{
		List<E> list = new ArrayList<>();
		iterable.forEach(list::add);
		return list;
	}
718137
public <P extends ParaObject> List<P> createAll(List<P> objects) {
		if (objects == null || objects.isEmpty() || objects.get(0) == null) {
			return Collections.emptyList();
		}
		final int size = this.chunkSize;
		return IntStream.range(0, getNumChunks(objects, size))
				.mapToObj(i -> (List<P>) partitionList(objects, i, size))
				.map(chunk -> invokePost("_batch", Entity.json(chunk)))
				.map(response -> (List<P>) this.getEntity(response, List.class))
				.map(entity -> (List<P>) getItemsFromList(entity))
				.flatMap(List::stream)
				.collect(Collectors.toList());
	}
901408
public static <E> List<E> asFlatList(Iterable<E>... iterables) {
		List<E> list = new ArrayList<E>();
		for(Iterable<E> iterable: iterables) {
			for(E e: iterable) {
				list.add(e);
			}
		}
		return list;
	}
1163516
@SafeVarargs
  public static <T> ArrayList<T> newArrayList(final Iterable<T>... iterables) {
    final ArrayList<T> resultList = newArrayList();
    for (final Iterable<T> oneIterable : iterables) {
      for (final T oneElement : oneIterable) {
        resultList.add(oneElement);
      }
    }
    return resultList;
  }
788971
public RouteResponse withResponseModels(java.util.Map<String, String> responseModels) {
        setResponseModels(responseModels);
        return this;
    }
1009728
public ServiceResponseBuilder<T, E> registerAll(Map<Integer, Type> responseTypes) {
        this.responseTypes.putAll(responseTypes);
        return this;
    }
44864
protected Map<String, Object> parseResponseObject(Response response) throws IOException {
		return parseResponse(response).parseObject();
	}
269865
protected <T> List<? extends List<T>> toArrayLists(List<List<T>> lists) {
        for (int i = 0; i < lists.size(); i++) {
            List<T> list = lists.get(i);
            lists.set(i, toArrayList(list));
        }
        return lists;
    }
569618
public static HttpServletResponse getHttpServletResponse(Object response)
    {
        // unwrap the response until we find a HttpServletResponse
        while (response != null)
        {
            if (response instanceof HttpServletResponse)
            {
                // found
                return (HttpServletResponse) response;
            }
            if (response instanceof ServletResponseWrapper)
            {
                // unwrap
                response = ((ServletResponseWrapper) response).getResponse();
            }
            // no more possibilities to find a HttpServletResponse
            break;
        }
        return null; // not found
    }
73595
public static <T> ArrayList<T> newArrayList(Iterable<T> iterable) {
		return (ArrayList<T>) list(false, iterable);
	}