@Override
      public boolean apply(HostRoleCommand hrc) {
        return hrc.getRole() ==  role;
      }
@param hostRoleCommands list of {@link HostRoleCommand}
@param role {@link Role}
@return list of {@link HostRoleCommand} that belongs to {@link Role}
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java