let see my example
Map<String, String> mapPeopleAndCountry = new HashMap<>();mapPeopleAndCountry.put("Matis", "Lithuania");mapPeopleAndCountry.put("Carlos", "Honduras");mapPeopleAndCountry.put("Teboho", "Lesotho");mapPeopleAndCountry.put("Marielos", "Honduras");List<String> peopleInHonduras = mapPeopleAndCountry.keySet() .stream() .filter(r -> mapPeopleAndCountry.get(r) .equals("Honduras")) .stream(Collectors.toList());// will return ["Carlos", "Marielos"]
Note: untested, may contains typo