class MinHosts extends CriteriaCommon {

    @Override
    public List<TopologyWrapper> filter(List<TopologyWrapper> topologies) {
        int minCount = Collections.min(topologies, Comparator.comparingInt(t -> t.getNodeTemplates().size()))
            .getNodeTemplates().size();
        return topologies.stream().filter(t -> t.getNodeTemplates().size() == minCount).collect(Collectors.toList());
    }

    public  MinHosts(JsonNode params, int outputCap);

}