TimurMahammadov / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

T join(T appendable, String delimiter, Function<U,String> function, Iterable<U> iterable) #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I wonder if you consider this kind of Join function as relevant or if you 
prefer to 

    private static final <T extends Appendable,U> 
T join(T appendable, String delimiter, Function<U,String> function, Iterable<U> 
iterable) {
        return Join.join(appendable,delimiter,Iterators.transform(iterable.iterator(), function));
    }

Original issue reported on code.google.com by romain.r...@gmail.com on 28 Oct 2007 at 10:07

GoogleCodeExporter commented 9 years ago
Argh!
So, I was wondering if you consider such a signature as relevant for the Join 
convenience methods or not...
This methods allows to transform the content of the iterable before being 
joined.

Original comment by romain.r...@gmail.com on 28 Oct 2007 at 10:09

GoogleCodeExporter commented 9 years ago
No need to add this method as it is already easy to accomplish (a hair easier 
than in
your example):

  Join.join(appendable, delimiter, Iterables.transform(iterable, function));

Original comment by kevin...@gmail.com on 28 Oct 2007 at 4:27

GoogleCodeExporter commented 9 years ago
OK this can fit to me :)
Thanks.

Original comment by romain.r...@gmail.com on 28 Oct 2007 at 4:32