You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/05/05 17:43:39 UTC

svn commit: r1479343 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java

Author: tn
Date: Sun May  5 15:43:38 2013
New Revision: 1479343

URL: http://svn.apache.org/r1479343
Log:
Use also varargs in internal FunctorUtils.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java?rev=1479343&r1=1479342&r2=1479343&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java Sun May  5 15:43:38 2013
@@ -46,7 +46,7 @@ class FunctorUtils {
      * @return the cloned predicates
      */
     @SuppressWarnings("unchecked")
-    static <T> Predicate<T>[] copy(final Predicate<? super T>[] predicates) {
+    static <T> Predicate<T>[] copy(final Predicate<? super T>... predicates) {
         if (predicates == null) {
             return null;
         }
@@ -75,7 +75,7 @@ class FunctorUtils {
      *
      * @param predicates  the predicates to validate
      */
-    static void validate(final Predicate<?>[] predicates) {
+    static void validate(final Predicate<?>... predicates) {
         if (predicates == null) {
             throw new IllegalArgumentException("The predicate array must not be null");
         }
@@ -119,7 +119,7 @@ class FunctorUtils {
      * @return the cloned closures
      */
     @SuppressWarnings("unchecked")
-    static <E> Closure<E>[] copy(final Closure<? super E>[] closures) {
+    static <E> Closure<E>[] copy(final Closure<? super E>... closures) {
         if (closures == null) {
             return null;
         }
@@ -131,7 +131,7 @@ class FunctorUtils {
      *
      * @param closures  the closures to validate
      */
-    static void validate(final Closure<?>[] closures) {
+    static void validate(final Closure<?>... closures) {
         if (closures == null) {
             throw new IllegalArgumentException("The closure array must not be null");
         }
@@ -165,7 +165,7 @@ class FunctorUtils {
      * @return a clone of the transformers
      */
     @SuppressWarnings("unchecked")
-    static <I, O> Transformer<I, O>[] copy(final Transformer<? super I, ? extends O>[] transformers) {
+    static <I, O> Transformer<I, O>[] copy(final Transformer<? super I, ? extends O>... transformers) {
         if (transformers == null) {
             return null;
         }
@@ -177,7 +177,7 @@ class FunctorUtils {
      *
      * @param transformers  the transformers to validate
      */
-    static void validate(final Transformer<?, ?>[] transformers) {
+    static void validate(final Transformer<?, ?>... transformers) {
         if (transformers == null) {
             throw new IllegalArgumentException("The transformer array must not be null");
         }