#How to check whether the list contains two objects with different parameters?

13 messages ยท Page 1 of 1 (latest)

pseudo elbowBOT
#

โŒ› This post has been reserved for your question.

Hey @plush dock! Please use /close or the Close Post button 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.

radiant blaze
#

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

radiant blaze
plush dock
#

amm, so what would you suggest? ๐Ÿ™‚

radiant blaze
#

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

plush dock
#

darn, Im not a fan of this ๐Ÿ˜„