Re: [lang?] Converting an array to an Iterable

2011-08-18 Thread Oliver Heger
Arrays.asList() produces a new List object (I assume, did not look at 
the code). A custom implementation of Iterable could return an iterator 
which directly operates on the array.


Oliver

Am 17.08.2011 23:00, schrieb Dave Brosius:

  What would this do that java.util.Arrays.asList does not?  - Original Message 
-From:quot;Oliver Hegerquot;;oliver.he...@oliver-heger.de



-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [lang?] Converting an array to an Iterable

2011-08-18 Thread Ted Dunning
The array list returned by Arrays.asList does exactly that.

On Thu, Aug 18, 2011 at 12:43 PM, Oliver Heger oliver.he...@oliver-heger.de
 wrote:

 Arrays.asList() produces a new List object (I assume, did not look at the
 code). A custom implementation of Iterable could return an iterator which
 directly operates on the array.

 Oliver

 Am 17.08.2011 23:00, schrieb Dave Brosius:

  What would this do that java.util.Arrays.asList does not?  - Original
 Message -From:quot;Oliver Hegerquot;;oliver.heger@**
 oliver-heger.de oliver.he...@oliver-heger.de



 --**--**-
 To unsubscribe, e-mail: 
 dev-unsubscribe@commons.**apache.orgdev-unsubscr...@commons.apache.org
 For additional commands, e-mail: dev-h...@commons.apache.org




[lang?] Converting an array to an Iterable

2011-08-17 Thread Oliver Heger

Hi,

recently I stumbled over the use case to obtain an Iterable for an 
array. I was pretty sure that there should already be a solution for 
this problem, but could not find anything in the JDK or in [lang].


Would this be an addition to [lang]? Maybe in ArrayUtils?

Oliver

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [lang?] Converting an array to an Iterable

2011-08-17 Thread Dave Brosius
 What would this do that java.util.Arrays.asList does not?  - Original 
Message -From: quot;Oliver Hegerquot; ;oliver.he...@oliver-heger.de