class MaintenanceStateHelper {

  public Set<String> filterHostsInMaintenanceState(Set<String> candidateHosts,
      HostPredicate condition) throws AmbariException {
    // Filter hosts that are in MS
    Set<String> removedHosts = new HashSet<>();
    for (String hostname : candidateHosts) {
      if (condition.shouldHostBeRemoved(hostname)) {
        removedHosts.add(hostname);
      }
    }
    candidateHosts.removeAll(removedHosts);
    return removedHosts;
  }

  @Inject public  MaintenanceStateHelper(Injector injector);

}