Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/90#discussion_r35807211
--- Diff: jena-base/src/main/java/org/apache/jena/atlas/iterator/Iter.java
---
@@ -29,6 +29,14 @@
import org.apache.jena.atlas.lib.Closeable ;
import org.apache.jena.atlas.lib.Sink ;
+/**
+ * Iter provides utilities for working with {@link Iterator}s.
+ *
+ * Iter should never be used as a return type or parameter type in the
public contract of a class. It is only to be used
+ * inside implementation code and is instantiated only to allow
method-chaining as part of a calculation.
--- End diff --
Iter itself does not impose that in its contract. It's the rest of jena
(the users of Iter) that choose to return "Iterator" not "Iter". c.f. Map and
HashMap.
"Iter is not usually used as a return type ..." which is more advice that
instruction. If some code wishes to expose method-chaining then no problem.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---