Custom Collector
i try to write a custom collector, but the supllier function keeps saying type mismatch. the input is a ResourceType, the output should be a set of strings. im not sure what type i should name for the accumulator function tho ^^" (java version 20 i think)
Type mismatch: cannot convert from List<String> to Supplier<List<String>>Java(16777235)
6 Replies
⌛
This post has been reserved for your question.
Hey @' .•TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.KIΛ.RΛR ’•. '! Please use
/closeor 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.
You're supposed to return a supplier of lists, not just one list
whatb is a supllier of lists?
It's something that supplies a list, curiously enough.
Usually by creating it
try
return ArrayList::new;
thx!
Post Closed
This post has been closed by <@586905336850677760>.