Substitute for Functions.string() ?

Brian Goetz brian.goetz at oracle.com
Wed Mar 20 11:13:47 PDT 2013


Yes.  We've been culling methods that are better off as method refs to 
existing methods.  Object::toString works just fine:

String concatted =
   objects.map(Object::toString)
          .collect(toStringJoiner(", "));

On 3/20/2013 1:52 PM, Michael Nascimento wrote:
> Hi guys,
>
> My code was using Functions.string() before b81. What is the
> alternative now? Object::toString() ?
>
> Regards,
> Michael
>


More information about the lambda-dev mailing list