yf0994 / guava-libraries

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

FluentIterator.skip: trivial clarification of confusing javadoc #1103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Will attach patch.

Original issue reported on code.google.com by bsmith.o...@gmail.com on 12 Aug 2012 at 7:20

GoogleCodeExporter commented 9 years ago
Supplied patch.

Original comment by bsmith.o...@gmail.com on 12 Aug 2012 at 7:23

Attachments:

GoogleCodeExporter commented 9 years ago
How does this represent an improvement?  A FluentIterable is returned, not an 
Iterator; referring to the "returned iterator" seems likely to confuse more, 
not less.

Original comment by wasserman.louis on 13 Aug 2012 at 12:14

GoogleCodeExporter commented 9 years ago
I agree that this makes things less clear and even inaccurate. I personally 
think the current Javadoc is pretty clear, but perhaps it could be improved 
somehow. What did you find confusing about it?

Original comment by cgdec...@gmail.com on 13 Aug 2012 at 4:39

GoogleCodeExporter commented 9 years ago
Modifications to this fluent iterable before a call to ***{@code iterator()}***
are reflected in the returned iterator. [...]

Since when does calling iterator() return an Iterable, fluent or otherwise?

What am I not understanding?

// Ben

Original comment by bsmith.o...@gmail.com on 13 Aug 2012 at 4:46

GoogleCodeExporter commented 9 years ago
Ben, it might be you're parsing that sentence the wrong way. It seems to me its 
structure is as follows: "Modifications to this object X before a call to X's 
iterator method of type () -> Y are reflected in the returned Y."

So in particular, changes to the FluentIterable affect the Iterator instance 
returned by a call to #iterator().  

Original comment by stephan...@gmail.com on 13 Aug 2012 at 6:28

GoogleCodeExporter commented 9 years ago
He surely is, but this sentence is really hard to parse. The following one 
makes it clearer, but the part "That is, *the its* iterator" is a typo, isn't 
it?

Original comment by Maaarti...@gmail.com on 17 Aug 2012 at 9:13

GoogleCodeExporter commented 9 years ago

Original comment by kak@google.com on 23 Oct 2012 at 4:09

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08