#Java streams filter

1 messages · Page 1 of 1 (latest)

rancid cairn
#

Hey guys, am i understanding the highlighted line correctly. The purpose of the filter is to remove anything thats less than 2 parts .Say for example, empty line and any accidental paragraphs ?

umbral waspBOT
#

<@&987246399047479336> please have a look, thanks.

umbral waspBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

rancid cairn
#

and only if its >= 2 it gets added to the stream and everything less than 2 just gets removed?

wild narwhal
#

yes

#

you take every element in the stream (parts ->) and do the following check: parts.length >= 2, then every element where it returns true is kept, and every element where it returns false is discarded