java - Easy way to change Iterable into Collection - Stack Overflow With Sets.newHashSet(Iterable) (...

Please Visit: http://ift.tt/1ajReyV



java - Easy way to change Iterable into Collection - Stack Overflow

With Sets.newHashSet(Iterable) (Link->http://ift.tt/1kQcGSL) , among other similar methods. This will of course copy all the elements in to memory. If that isn't acceptable, I think your code that works with these ought to take Iterable rather than Collection. Guava also happens to provide convenient methods for doing things you can do on a Collection using an Iterable (such as Iterables.isEmpty(Iterable) or Iterables.contains(Iterable, Object)), but the performance implications are more obviouhttp://http://ift.tt/1qjLp27

http://ift.tt/1kQcH8Z



java - Easy way to change Iterable into Collection - Stack Overflow







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1qjLqD4

via LifeLong Community

No comments:

Post a Comment