You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main advantage of Guava Joiner over JDKs Collectors.joining(...) or StringJoiner that it can handle arbitrary objects and has a convenient builder api to express e.g. .useForNull(nullText).
Thus allow the usage of Joiner when streams come into play and get rid of cumbersome expressions like .filter(Objects::nonNull).map(Object::toString).
The main advantage of Guava
Joiner
over JDKsCollectors.joining(...)
orStringJoiner
that it can handle arbitrary objects and has a convenient builder api to express e.g..useForNull(nullText)
.Thus allow the usage of Joiner when streams come into play and get rid of cumbersome expressions like
.filter(Objects::nonNull).map(Object::toString)
.E.g. with factory method joiningOn(...):
Alternatively
Joiner
could implement Collector interface.The text was updated successfully, but these errors were encountered: