Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Commons Wiki" for 
change notification.

The "Sanity Check of APIs, etc." page has been changed by MattBenson:
http://wiki.apache.org/commons/Sanity%20Check%20of%20APIs%2C%20etc.?action=diff&rev1=4&rev2=5

Comment:
finish my comments

     (Same question would apply to -Predicate and -Procedure in addition to 
-Function) Using a vararg parameter would preclude the binary (and hypothetical 
ternary, etc.) functors from supporting different strongly typed arguments.  I 
think it would be a step backward.  MJB
  
   * '''''EachElement should be able to work on any Iterable. Also I'm not sure 
to understand why its constructor is public.'''''
+    Agreed about the first point; added 
https://issues.apache.org/jira/browse/FUNCTOR-13 .  As to why the ctor is 
public, the javadoc says "This constructor is public to permit tools that 
require a JavaBean instance to operate."  Not sure how many tools actually 
still need this.  Velocity was the primary suspect for ages; does anyone know 
if it still needs a bean instance?
  
   * '''''Shouldn't Generator implement Iterable?'''''
+    It doesn't seem so to me.  It's possible some more expository name could 
be found for Generator.
  
   * '''''why are equals, hashCode and toString defined in the Functor 
interface?'''''
     I don't feel strongly about this.  The original author/s of [functor] 
presumably used this as a natural place to put their javadoc comments urging 
that functor implementations properly implement these methods.  Feel free to 
POLL or VOTE on the dev list.
@@ -25, +27 @@

     The static method is the option to choose for strong typing.  I don't feel 
strongly about retaining the static fields which of course predated the 
generics work.  If you want, JFDI.
  
   * '''''The Javadoc for Limit states "A predicate that returns true the first 
n times it is invoked.", but what happens after? Is it the opposite of 
Offset?'''''
+    Same Javadoc comment says "and <code>false</code> thereafter."  It is 
indeed the opposite of offset.
  
   * '''''Why aren't Limit and Offset serializable like the other classes in 
the core package?'''''
+    Because these have state.  There is an open issue for this:  
https://issues.apache.org/jira/browse/FUNCTOR-9 .  Please comment there and/or 
apply the available patch if you see fit.
  
   * '''''Limit and Offset could probably use an AtomicInteger instead of a 
synchronized block'''''
+    I'm not filing an issue for this yet, but feel free to make this change if 
on further investigation you still feel it to be proper, or I will do the same. 
 I haven't made use of the Atomic- number classes myself so I would have to 
study them first.  MJB
  
   * '''''the site has no example easily accessible, the reader is invited to 
browse the JUnit tests. That's not really user friendly.'''''
     https://issues.apache.org/jira/browse/FUNCTOR-4
@@ -43, +48 @@

     I agree with this.  https://issues.apache.org/jira/browse/FUNCTOR-11
  
   * '''''CollectionTransformer has a todo stating : "TODO revisit this 
class..."'''''
+    True; the issues noted need to be addressed before a release.
  
   * '''''There are several untested classes in the composite package'''''
     Noted.  https://issues.apache.org/jira/browse/FUNCTOR-12

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to