commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r666327 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsEmpty.java
Date Tue, 10 Jun 2008 21:09:20 GMT
Author: mbenson
Date: Tue Jun 10 14:09:20 2008
New Revision: 666327

URL: http://svn.apache.org/viewvc?rev=666327&view=rev
Log:
make instance() methods conform to the approach adopted in the genericization of [functor]:
yield a parameterized instance

Modified:
    commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsEmpty.java

Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsEmpty.java
URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsEmpty.java?rev=666327&r1=666326&r2=666327&view=diff
==============================================================================
--- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsEmpty.java
(original)
+++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/core/collection/IsEmpty.java
Tue Jun 10 14:09:20 2008
@@ -32,7 +32,10 @@
     // class variables
     // ------------------------------------------------------------------------
 
-    private static final IsEmpty<Object> INSTANCE = new IsEmpty<Object>();
+    /**
+     * Basic IsEmpty instance.
+     */
+    public static final IsEmpty<Object> INSTANCE = new IsEmpty<Object>();
 
     // constructor
     // ------------------------------------------------------------------------
@@ -129,8 +132,8 @@
      * Get an IsEmpty instance.
      * @return IsEmpty
      */
-    public static final IsEmpty<Object> instance() {
-        return INSTANCE;
+    public static final <A> IsEmpty<A> instance() {
+        return new IsEmpty<A>();
     }
 
 }



Mime
View raw message