I'm using the following stream() to get one random element from a list (of strings):
string.stream().filter { f -> f.contains("_reservert_") }.toList().random()
Is there a way to get x random AND uniqie elements in the same way?
Aucun commentaire:
Enregistrer un commentaire