private boolean showStatusesForHosts(final String hostPattern, final Set<JobId> jobIds,
final Map<JobId, JobStatus> statuses, final HostStatusDisplayer statusDisplayer) {
boolean noHostMatchedEver = true;
for (final JobId jobId : Ordering.natural().sortedCopy(jobIds)) {
final JobStatus jobStatus = statuses.get(jobId);
// jobStatus will be null if the job was deleted after we first got the list of job IDs
if (jobStatus == null) {
continue;
}
// Merge hosts without any status into the set of hosts with a reported task status
final Map<String, TaskStatus> taskStatuses = Maps.newTreeMap();
taskStatuses.putAll(jobStatus.getTaskStatuses());
for (final String host : jobStatus.getDeployments().keySet()) {
if (!taskStatuses.containsKey(host)) {
taskStatuses.put(host, null);
}
}