#How to check whether the list contains two objects with different parameters?
13 messages ยท Page 1 of 1 (latest)
โ This post has been reserved for your question.
Hey @plush dock! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
well, it's not wrong
it just could be represented better
i don't think streams are the best for doing this
for the map, sure
(for readability)
amm, so what would you suggest? ๐
i guess something like this, after you've collected it into a list
enFound = false
deFound = false
for element of list
if en: enFound = true
if de: deFound = true
if enFound and deFound: break
return enFound and deFound
maybe a map of like, Map<String, Boolean> would do better
i really don't know, never encountered this
a Map would probably be useful if you need to extend this
darn, Im not a fan of this ๐