tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r948273 - in /tapestry/tapestry5/trunk: tapestry-core/src/main/java/org/apache/tapestry5/internal/ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/ ...
Date Wed, 26 May 2010 00:40:23 GMT
Author: hlship
Date: Wed May 26 00:40:22 2010
New Revision: 948273

URL: http://svn.apache.org/viewvc?rev=948273&view=rev
Log:
Move Func to a new public package and rename it F

Added:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
  (contents, props changed)
      - copied, changed from r948226, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Func.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
  (contents, props changed)
      - copied, changed from r948226, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Operation.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
  (contents, props changed)
      - copied, changed from r948226, tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/FuncTest.java
Removed:
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Func.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Operation.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/FuncTest.java
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryInternalUtils.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavascriptStack.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/JavascriptStackPathConstructorImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/MultiZoneUpdateInsideForm.java
    tapestry/tapestry5/trunk/tapestry-ioc/src/test/conf/testng.xml

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryInternalUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryInternalUtils.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryInternalUtils.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/TapestryInternalUtils.java
Wed May 26 00:40:22 2010
@@ -33,9 +33,9 @@ import org.apache.tapestry5.ioc.Orderabl
 import org.apache.tapestry5.ioc.Resource;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.Defense;
-import org.apache.tapestry5.ioc.internal.util.Func;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.Coercion;
+import org.apache.tapestry5.ioc.util.func.F;
 import org.apache.tapestry5.services.javascript.StylesheetLink;
 
 /**
@@ -561,7 +561,7 @@ public class TapestryInternalUtils
     }
 
     /**
-     * Common coercion, used primarily with {@link Func#map(Coercion, java.util.Collection)}
+     * Common coercion, used primarily with {@link F#map(Coercion, java.util.Collection)}
      * 
      * @since 5.2.0
      */

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
Wed May 26 00:40:22 2010
@@ -25,8 +25,8 @@ import org.apache.tapestry5.ioc.Messages
 import org.apache.tapestry5.ioc.Resource;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Operation;
 import org.apache.tapestry5.ioc.services.ClasspathURLConverter;
+import org.apache.tapestry5.ioc.util.func.Operation;
 import org.apache.tapestry5.model.ComponentModel;
 import org.apache.tapestry5.services.InvalidationEventHub;
 import org.apache.tapestry5.services.UpdateListener;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
Wed May 26 00:40:22 2010
@@ -21,8 +21,8 @@ import org.apache.tapestry5.dom.Document
 import org.apache.tapestry5.dom.Element;
 import org.apache.tapestry5.dom.Node;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Func;
-import org.apache.tapestry5.ioc.internal.util.Operation;
+import org.apache.tapestry5.ioc.util.func.F;
+import org.apache.tapestry5.ioc.util.func.Operation;
 import org.apache.tapestry5.json.JSONObject;
 import org.apache.tapestry5.services.javascript.InitializationPriority;
 import org.apache.tapestry5.services.javascript.StylesheetLink;
@@ -244,7 +244,7 @@ public class DocumentLinkerImpl implemen
             }
         };
 
-        Func.each(addScript, scripts);
+        F.each(addScript, scripts);
 
         if (existing != null)
             scriptContainer.moveBefore(existing);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ObjectComponentEventResultProcessor.java
Wed May 26 00:40:22 2010
@@ -18,11 +18,11 @@ import java.io.IOException;
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.tapestry5.ioc.internal.util.Func;
 import org.apache.tapestry5.ioc.services.ClassFabUtils;
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.util.AvailableValues;
 import org.apache.tapestry5.ioc.util.UnknownValueException;
+import org.apache.tapestry5.ioc.util.func.F;
 import org.apache.tapestry5.services.ComponentEventResultProcessor;
 
 /**
@@ -40,7 +40,7 @@ public class ObjectComponentEventResultP
 
     public void processResultValue(Object value) throws IOException
     {
-        List<String> names = Func.map(new Coercion<Class, String>()
+        List<String> names = F.map(new Coercion<Class, String>()
         {
             public String coerce(Class input)
             {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavascriptSupportImpl.java
Wed May 26 00:40:22 2010
@@ -25,10 +25,10 @@ import org.apache.tapestry5.internal.ser
 import org.apache.tapestry5.internal.services.javascript.JavascriptStackPathConstructor;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.ioc.internal.util.Defense;
-import org.apache.tapestry5.ioc.internal.util.Func;
 import org.apache.tapestry5.ioc.internal.util.IdAllocator;
-import org.apache.tapestry5.ioc.internal.util.Operation;
 import org.apache.tapestry5.ioc.services.Coercion;
+import org.apache.tapestry5.ioc.util.func.F;
+import org.apache.tapestry5.ioc.util.func.Operation;
 import org.apache.tapestry5.json.JSONArray;
 import org.apache.tapestry5.json.JSONObject;
 import org.apache.tapestry5.services.javascript.InitializationPriority;
@@ -92,7 +92,7 @@ public class JavascriptSupportImpl imple
 
     public void commit()
     {
-        Func.each(new Operation<StylesheetLink>()
+        F.each(new Operation<StylesheetLink>()
         {
             public void op(StylesheetLink value)
             {
@@ -108,8 +108,8 @@ public class JavascriptSupportImpl imple
             }
         };
 
-        Func.each(linkLibrary, stackLibraries);
-        Func.each(linkLibrary, otherLibraries);
+        F.each(linkLibrary, stackLibraries);
+        F.each(linkLibrary, otherLibraries);
 
         for (InitializationPriority p : InitializationPriority.values())
         {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavascriptStack.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavascriptStack.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavascriptStack.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/CoreJavascriptStack.java
Wed May 26 00:40:22 2010
@@ -20,7 +20,7 @@ import org.apache.tapestry5.Asset;
 import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.internal.TapestryInternalUtils;
 import org.apache.tapestry5.ioc.annotations.Symbol;
-import org.apache.tapestry5.ioc.internal.util.Func;
+import org.apache.tapestry5.ioc.util.func.F;
 import org.apache.tapestry5.services.ClientInfrastructure;
 import org.apache.tapestry5.services.javascript.JavascriptStack;
 import org.apache.tapestry5.services.javascript.StylesheetLink;
@@ -57,7 +57,7 @@ public class CoreJavascriptStack impleme
 
     public List<StylesheetLink> getStylesheets()
     {
-        return Func.map(TapestryInternalUtils.assetToStylesheetLink, clientInfrastructure.getStylesheetStack());
+        return F.map(TapestryInternalUtils.assetToStylesheetLink, clientInfrastructure.getStylesheetStack());
     }
 
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java
Wed May 26 00:40:22 2010
@@ -23,9 +23,9 @@ import org.apache.tapestry5.Asset;
 import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.internal.TapestryInternalUtils;
 import org.apache.tapestry5.ioc.annotations.Symbol;
-import org.apache.tapestry5.ioc.internal.util.Func;
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.services.ThreadLocale;
+import org.apache.tapestry5.ioc.util.func.F;
 import org.apache.tapestry5.json.JSONArray;
 import org.apache.tapestry5.json.JSONObject;
 import org.apache.tapestry5.services.AssetSource;
@@ -56,13 +56,13 @@ public class DateFieldStack implements J
             }
         };
 
-        Coercion<String, StylesheetLink> pathToStylesheetLink = Func.combine(pathToAsset,
+        Coercion<String, StylesheetLink> pathToStylesheetLink = F.combine(pathToAsset,
                 TapestryInternalUtils.assetToStylesheetLink);
 
-        javascriptStack = Func.map(pathToAsset, "${tapestry.datepicker}/js/datepicker.js",
+        javascriptStack = F.map(pathToAsset, "${tapestry.datepicker}/js/datepicker.js",
                 "org/apache/tapestry5/corelib/components/datefield.js");
 
-        stylesheetStack = Func.map(pathToStylesheetLink, "${tapestry.datepicker}/css/datepicker.css");
+        stylesheetStack = F.map(pathToStylesheetLink, "${tapestry.datepicker}/css/datepicker.css");
     }
 
     public String getInitialization()

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/JavascriptStackPathConstructorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/JavascriptStackPathConstructorImpl.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/JavascriptStackPathConstructorImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/JavascriptStackPathConstructorImpl.java
Wed May 26 00:40:22 2010
@@ -21,9 +21,9 @@ import org.apache.tapestry5.SymbolConsta
 import org.apache.tapestry5.internal.services.RequestConstants;
 import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Func;
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.services.ThreadLocale;
+import org.apache.tapestry5.ioc.util.func.F;
 import org.apache.tapestry5.services.assets.AssetPathConstructor;
 import org.apache.tapestry5.services.javascript.JavascriptStack;
 import org.apache.tapestry5.services.javascript.JavascriptStackSource;
@@ -72,7 +72,7 @@ public class JavascriptStackPathConstruc
 
     private List<String> toPaths(List<Asset> assets)
     {
-        return Func.map(toPath, assets);
+        return F.map(toPath, assets);
     }
 
     private List<String> combinedStackURL(String stackName)

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ImportWorker.java
Wed May 26 00:40:22 2010
@@ -23,10 +23,10 @@ import org.apache.tapestry5.ComponentRes
 import org.apache.tapestry5.annotations.Import;
 import org.apache.tapestry5.annotations.SetupRender;
 import org.apache.tapestry5.ioc.Resource;
-import org.apache.tapestry5.ioc.internal.util.Func;
-import org.apache.tapestry5.ioc.internal.util.Operation;
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.services.SymbolSource;
+import org.apache.tapestry5.ioc.util.func.F;
+import org.apache.tapestry5.ioc.util.func.Operation;
 import org.apache.tapestry5.model.MutableComponentModel;
 import org.apache.tapestry5.services.AssetSource;
 import org.apache.tapestry5.services.ClassTransformation;
@@ -205,7 +205,7 @@ public class ImportWorker implements Com
 
     private List<Asset> convertPathsToAssets(final Resource baseResource, final Locale
locale, String[] assetPaths)
     {
-        return Func.map(new Coercion<String, Asset>()
+        return F.map(new Coercion<String, Asset>()
         {
             public Asset coerce(String assetPath)
             {
@@ -224,7 +224,7 @@ public class ImportWorker implements Com
             {
                 List<Asset> assets = (List<Asset>) access.read(invocation.getInstance());
 
-                Func.each(operation, assets);
+                F.each(operation, assets);
 
                 invocation.proceed();
             }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/MultiZoneUpdateInsideForm.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/MultiZoneUpdateInsideForm.java?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/MultiZoneUpdateInsideForm.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/MultiZoneUpdateInsideForm.java
Wed May 26 00:40:22 2010
@@ -30,8 +30,8 @@ import org.apache.tapestry5.annotations.
 import org.apache.tapestry5.corelib.components.Select;
 import org.apache.tapestry5.corelib.components.Zone;
 import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.ioc.internal.util.Func;
 import org.apache.tapestry5.ioc.services.Coercion;
+import org.apache.tapestry5.ioc.util.func.F;
 import org.apache.tapestry5.services.Request;
 import org.apache.tapestry5.util.AbstractSelectModel;
 
@@ -104,7 +104,7 @@ public class MultiZoneUpdateInsideForm
 
         public List<OptionModel> getOptions()
         {
-            return Func.map(new Coercion<SelectObj, OptionModel>()
+            return F.map(new Coercion<SelectObj, OptionModel>()
             {
                 public OptionModel coerce(final SelectObj input)
                 {

Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
(from r948226, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Func.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Func.java&r1=948226&r2=948273&rev=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Func.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
Wed May 26 00:40:22 2010
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry5.ioc.internal.util;
+package org.apache.tapestry5.ioc.util.func;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -21,6 +21,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.tapestry5.ioc.Predicate;
+import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.ioc.services.Coercion;
 
 /**
@@ -30,7 +31,7 @@ import org.apache.tapestry5.ioc.services
  * 
  * @since 5.2.0
  */
-public class Func
+public class F
 {
 
     /**

Propchange: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/F.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
(from r948226, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Operation.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Operation.java&r1=948226&r2=948273&rev=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/Operation.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
Wed May 26 00:40:22 2010
@@ -12,13 +12,13 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry5.ioc.internal.util;
+package org.apache.tapestry5.ioc.util.func;
 
 /**
  * An operational function used with a collection.
  * 
  * @since 5.2.0
- * @see Func#each(Operation, java.util.Collection)
+ * @see F#each(Operation, java.util.Collection)
  */
 public interface Operation<T>
 {

Propchange: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/util/func/Operation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/conf/testng.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/conf/testng.xml?rev=948273&r1=948272&r2=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/conf/testng.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/conf/testng.xml Wed May 26 00:40:22 2010
@@ -22,6 +22,7 @@
             <package name="org.apache.tapestry5.ioc.services"/>
             <package name="org.apache.tapestry5.ioc.test"/>
             <package name="org.apache.tapestry5.ioc.util"/>
+            <package name="org.apache.tapestry5.ioc.util.func"/>
         </packages>
     </test>
     <test name="Internals">

Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
(from r948226, tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/FuncTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/FuncTest.java&r1=948226&r2=948273&rev=948273&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/FuncTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
Wed May 26 00:40:22 2010
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry5.ioc.internal.util;
+package org.apache.tapestry5.ioc.util.func;
 
 import java.util.Arrays;
 import java.util.Collections;
@@ -21,6 +21,8 @@ import java.util.List;
 import org.apache.tapestry5.ioc.Predicate;
 import org.apache.tapestry5.ioc.services.Coercion;
 import org.apache.tapestry5.ioc.test.TestBase;
+import org.apache.tapestry5.ioc.util.func.F;
+import org.apache.tapestry5.ioc.util.func.Operation;
 import org.testng.annotations.Test;
 
 public class FuncTest extends TestBase
@@ -54,7 +56,7 @@ public class FuncTest extends TestBase
     {
         List<String> source = Arrays.asList("Mary", "had", "a", "little", "lamb");
 
-        List<Integer> lengths = Func.map(stringToLength, source);
+        List<Integer> lengths = F.map(stringToLength, source);
 
         assertListsEquals(lengths, 4, 3, 1, 6, 4);
     }
@@ -62,7 +64,7 @@ public class FuncTest extends TestBase
     @Test
     public void combine_coercions()
     {
-        List<Boolean> even = Func.map(Func.combine(stringToLength, toEven), "Mary",
"had", "a", "little", "lamb");
+        List<Boolean> even = F.map(F.combine(stringToLength, toEven), "Mary", "had",
"a", "little", "lamb");
 
         assertListsEquals(even, true, false, false, true, true);
     }
@@ -72,7 +74,7 @@ public class FuncTest extends TestBase
     {
         List<String> source = Arrays.asList();
 
-        List<Integer> lengths = Func.map(stringToLength, source);
+        List<Integer> lengths = F.map(stringToLength, source);
 
         assertSame(lengths, Collections.EMPTY_LIST);
     }
@@ -95,7 +97,7 @@ public class FuncTest extends TestBase
             }
         };
 
-        Func.each(op, source);
+        F.each(op, source);
 
         assertEquals(buffer.toString(), "Mary had a little lamb");
     }
@@ -105,7 +107,7 @@ public class FuncTest extends TestBase
     {
         List<Integer> input = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
 
-        List<Integer> output = Func.filter(evenp, input);
+        List<Integer> output = F.filter(evenp, input);
 
         assertListsEquals(output, 2, 4, 6);
     }
@@ -115,7 +117,7 @@ public class FuncTest extends TestBase
     {
         List<Integer> input = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
 
-        List<Integer> output = Func.remove(evenp, input);
+        List<Integer> output = F.remove(evenp, input);
 
         assertListsEquals(output, 1, 3, 5, 7);
     }
@@ -125,7 +127,7 @@ public class FuncTest extends TestBase
     {
         List<Integer> input = Arrays.asList();
 
-        List<Integer> output = Func.filter(evenp, input);
+        List<Integer> output = F.filter(evenp, input);
 
         assertSame(output, Collections.EMPTY_LIST);
     }
@@ -135,7 +137,7 @@ public class FuncTest extends TestBase
     {
         List<Integer> input = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
 
-        List<Integer> output = Func.filter(Func.and(evenp, Func.gt(3)), input);
+        List<Integer> output = F.filter(F.and(evenp, F.gt(3)), input);
 
         assertListsEquals(output, 4, 6);
     }
@@ -145,11 +147,11 @@ public class FuncTest extends TestBase
     {
         List<Integer> input = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
 
-        assertEquals(Func.filter(Func.eq(3), input), Arrays.asList(3));
-        assertEquals(Func.filter(Func.neq(3), input), Arrays.asList(1, 2, 4, 5, 6, 7));
-        assertEquals(Func.filter(Func.lt(3), input), Arrays.asList(1, 2));
-        assertEquals(Func.filter(Func.lteq(3), input), Arrays.asList(1, 2, 3));
-        assertEquals(Func.filter(Func.gteq(3), input), Arrays.asList(3, 4, 5, 6, 7));
+        assertEquals(F.filter(F.eq(3), input), Arrays.asList(3));
+        assertEquals(F.filter(F.neq(3), input), Arrays.asList(1, 2, 4, 5, 6, 7));
+        assertEquals(F.filter(F.lt(3), input), Arrays.asList(1, 2));
+        assertEquals(F.filter(F.lteq(3), input), Arrays.asList(1, 2, 3));
+        assertEquals(F.filter(F.gteq(3), input), Arrays.asList(3, 4, 5, 6, 7));
     }
 
     @Test
@@ -157,14 +159,14 @@ public class FuncTest extends TestBase
     {
         List<String> source = Arrays.asList("Mary", "had", "a", "little", "lamb");
 
-        Predicate<String> combinedp = Func.toPredicate(Func.combine(stringToLength,
toEven));
-        Coercion<String, String> identity = Func.identity();
-        Predicate<String> isNull = Func.isNull();
+        Predicate<String> combinedp = F.toPredicate(F.combine(stringToLength, toEven));
+        Coercion<String, String> identity = F.identity();
+        Predicate<String> isNull = F.isNull();
 
         // Converting to null and then filtering out nulls is the hard way to do filter or
remove,
         // but exercises the code we want to test.
 
-        List<String> filtered = Func.remove(isNull, Func.map(Func.select(combinedp,
identity), source));
+        List<String> filtered = F.remove(isNull, F.map(F.select(combinedp, identity),
source));
 
         assertListsEquals(filtered, "Mary", "little", "lamb");
     }

Propchange: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/util/func/FuncTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message