oday
08/11/2022, 2:56 PMif the values in this list are valid values in my enum
?
I am doing this
if (queryParams.containsAll(GiveConsent.ConsentType.values())){
but i get this error that it expects a collection and I gave it an ArrayJoffrey
08/11/2022, 3:00 PMJoffrey
08/11/2022, 3:02 PMval validEnumValues = GiveConsent.ConsentType.values().map { it.name }.toSet()
if (queryParams.all { it in validEnumValues }) {
...
}
(If your queryParams
values are strings)Joffrey
08/11/2022, 3:05 PMall
)oday
08/11/2022, 3:22 PModay
08/11/2022, 3:22 PModay
08/11/2022, 3:22 PM