You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2023/01/28 23:08:17 UTC

[groovy] branch master updated (b88a331f3a -> 1ce68128e7)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


    from b88a331f3a add AGM reverse variants
     new 916a1c5f60 GROOVY-7319: Add primitive array min() and max()
     new 1ce68128e7 GROOVY-7319: Add primitive optimised array min() and max() Inspiration from Yu Kobayashi (https://github.com/groovy/groovy-core/pull/616 from 2015)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../DoubleComparator.java}                         |  19 +-
 .../IntComparator.java}                            |  19 +-
 .../LongComparator.java}                           |  19 +-
 .../control => groovy/util/function}/package.html  |   4 +-
 .../groovy/runtime/ArrayGroovyMethods.java         | 397 +++++++++++++++++++++
 5 files changed, 426 insertions(+), 32 deletions(-)
 copy src/main/java/groovy/util/{ResourceConnector.java => function/DoubleComparator.java} (66%)
 copy src/main/java/groovy/util/{ResourceConnector.java => function/IntComparator.java} (67%)
 copy src/main/java/groovy/util/{ResourceConnector.java => function/LongComparator.java} (66%)
 copy src/main/java/{org/codehaus/groovy/control => groovy/util/function}/package.html (90%)


[groovy] 02/02: GROOVY-7319: Add primitive optimised array min() and max() Inspiration from Yu Kobayashi (https://github.com/groovy/groovy-core/pull/616 from 2015)

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 1ce68128e7a7cc15a9cdf0ae43cac648b19205a7
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Jan 26 22:45:31 2023 +1000

    GROOVY-7319: Add primitive optimised array min() and max()
    Inspiration from Yu Kobayashi (https://github.com/groovy/groovy-core/pull/616 from 2015)
---
 .../groovy/runtime/ArrayGroovyMethods.java         | 397 +++++++++++++++++++++
 1 file changed, 397 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/runtime/ArrayGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/ArrayGroovyMethods.java
index ab0712cd50..9d6346996f 100644
--- a/src/main/java/org/codehaus/groovy/runtime/ArrayGroovyMethods.java
+++ b/src/main/java/org/codehaus/groovy/runtime/ArrayGroovyMethods.java
@@ -25,6 +25,10 @@ import groovy.lang.Range;
 import groovy.transform.stc.ClosureParams;
 import groovy.transform.stc.FirstParam;
 import groovy.transform.stc.FromString;
+import groovy.util.function.DoubleComparator;
+import groovy.util.function.IntComparator;
+import groovy.util.function.LongComparator;
+import org.apache.groovy.lang.annotation.Incubating;
 import org.codehaus.groovy.runtime.callsite.BooleanClosureWrapper;
 import org.codehaus.groovy.runtime.dgmimpl.NumberNumberDiv;
 import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
@@ -50,6 +54,9 @@ import java.util.Map;
 import java.util.Objects;
 import java.util.NoSuchElementException;
 import java.util.Set;
+import java.util.function.DoubleUnaryOperator;
+import java.util.function.IntUnaryOperator;
+import java.util.function.LongUnaryOperator;
 
 /**
  * This class defines new groovy methods which appear on primitive arrays inside the Groovy environment.
@@ -3584,6 +3591,71 @@ public class ArrayGroovyMethods extends DefaultGroovyMethodsSupport {
         return answer;
     }
 
+    /**
+     * Selects the maximum value found from the int array
+     * using the supplier IntBinaryOperator as a comparator to determine the maximum of any two values.
+     * <p>
+     * <pre class="groovyTestCase">
+     * int[] nums = [10, 20, -30]
+     * assert 20 == nums.max{ n, m {@code ->} n {@code <=>} m }
+     * assert -30 == nums.max{ n, m {@code ->} n.abs() {@code <=>} m.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     an int array
+     * @param comparator a comparator, i.e. returns a negative value if the first parameter is less than the second
+     * @return the maximum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static int max(int[] self, IntComparator comparator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "max");
+
+        int maxV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            int v = self[i];
+            if (comparator.compare(v, maxV) > 0) {
+                maxV = v;
+            }
+        }
+        return maxV;
+    }
+
+    /**
+     * Selects the maximum value found from the int array
+     * using the supplier IntUnaryOperator to determine the maximum of any two values.
+     * The operator is applied to each array element and the results are compared.
+     * <p>
+     * <pre class="groovyTestCase">
+     * int[] nums = [10, 20, -30]
+     * assert 20 == nums.max{ it }
+     * assert -30 == nums.max{ it.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     an int array
+     * @param operator an operator that returns an int used for comparing values
+     * @return the maximum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static int max(int[] self, IntUnaryOperator operator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "max");
+
+        int maxV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            int v = self[i];
+            if (operator.applyAsInt(v) > operator.applyAsInt(maxV)) {
+                maxV = v;
+            }
+        }
+        return maxV;
+    }
+
     /**
      * Adds max() method to long arrays.
      * <p/>
@@ -3608,6 +3680,71 @@ public class ArrayGroovyMethods extends DefaultGroovyMethodsSupport {
         return answer;
     }
 
+    /**
+     * Selects the maximum value found from the long array
+     * using the supplier LongBinaryOperator as a comparator to determine the maximum of any two values.
+     * <p>
+     * <pre class="groovyTestCase">
+     * long[] nums = [10L, 20L, -30L]
+     * assert 20L == nums.max{ n, m {@code ->} n {@code <=>} m }
+     * assert -30L == nums.max{ n, m {@code ->} n.abs() {@code <=>} m.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     a long array
+     * @param comparator a comparator, i.e. returns a negative value if the first parameter is less than the second
+     * @return the maximum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static long max(long[] self, LongComparator comparator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "max");
+
+        long maxV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            long v = self[i];
+            if (comparator.compare(v, maxV) > 0) {
+                maxV = v;
+            }
+        }
+        return maxV;
+    }
+
+    /**
+     * Selects the maximum value found from the long array
+     * using the supplier LongUnaryOperator to determine the maximum of any two values.
+     * The operator is applied to each array element and the results are compared.
+     * <p>
+     * <pre class="groovyTestCase">
+     * long[] nums = [10L, 20L, -30L]
+     * assert 20L == nums.max{ it }
+     * assert -30L == nums.max{ it.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     a long array
+     * @param operator an operator that returns a long used for comparing values
+     * @return the maximum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static long max(long[] self, LongUnaryOperator operator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "max");
+
+        long maxV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            long v = self[i];
+            if (operator.applyAsLong(v) > operator.applyAsLong(maxV)) {
+                maxV = v;
+            }
+        }
+        return maxV;
+    }
+
     /**
      * Adds max() method to double arrays.
      * <p/>
@@ -3632,6 +3769,71 @@ public class ArrayGroovyMethods extends DefaultGroovyMethodsSupport {
         return answer;
     }
 
+    /**
+     * Selects the maximum value found from the double array
+     * using the supplier DoubleComparator to determine the maximum of any two values.
+     * <p>
+     * <pre class="groovyTestCase">
+     * double[] nums = [10d, 20d, -30d]
+     * assert 20d == nums.max{ n, m {@code ->} n {@code <=>} m }
+     * assert -30d == nums.max{ n, m {@code ->} n.abs() {@code <=>} m.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self       a double array
+     * @param comparator a comparator, i.e. returns a negative value if the first parameter is less than the second
+     * @return the maximum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static double max(double[] self, DoubleComparator comparator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "max");
+
+        double maxV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            double v = self[i];
+            if (comparator.compare(v, maxV) > 0) {
+                maxV = v;
+            }
+        }
+        return maxV;
+    }
+
+    /**
+     * Selects the maximum value found from the double array
+     * using the supplier DoubleUnaryOperator to determine the maximum of any two values.
+     * The operator is applied to each array element and the results are compared.
+     * <p>
+     * <pre class="groovyTestCase">
+     * double[] nums = [10d, 20d, -30d]
+     * assert -30d == nums.max{ it.abs() }
+     * assert 20d == nums.max{ it }
+     * </pre>
+     * <p>
+     *
+     * @param self     a double array
+     * @param operator an operator that returns a double used for comparing values
+     * @return the maximum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static double max(double[] self, DoubleUnaryOperator operator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "max");
+
+        double maxV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            double v = self[i];
+            if (operator.applyAsDouble(v) > operator.applyAsDouble(maxV)) {
+                maxV = v;
+            }
+        }
+        return maxV;
+    }
+
     //-------------------------------------------------------------------------
     // min
 
@@ -3659,6 +3861,71 @@ public class ArrayGroovyMethods extends DefaultGroovyMethodsSupport {
         return answer;
     }
 
+    /**
+     * Selects the minimum value found from the int array
+     * using the supplier IntComparator to determine the minimum of any two values.
+     * <p>
+     * <pre class="groovyTestCase">
+     * int[] nums = [10, -20, 30]
+     * assert -20 == nums.min{ n, m {@code ->} n {@code <=>} m }
+     * assert 10 == nums.min{ n, m {@code ->} n.abs() {@code <=>} m.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self       an int array
+     * @param comparator a comparator, i.e. returns a negative value if the first parameter is less than the second
+     * @return the minimum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static int min(int[] self, IntComparator comparator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "min");
+
+        int minV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            int v = self[i];
+            if (comparator.compare(v, minV) < 0) {
+                minV = v;
+            }
+        }
+        return minV;
+    }
+
+    /**
+     * Selects the minimum value found from the int array
+     * using the supplier IntUnaryOperator to determine the minimum of any two values.
+     * The operator is applied to each array element and the results are compared.
+     * <p>
+     * <pre class="groovyTestCase">
+     * int[] nums = [10, -20, 30]
+     * assert -20L == nums.min{ n {@code ->} n }
+     * assert 10L == nums.min{ n {@code ->} n.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     an int array
+     * @param operator an operator that returns an int used for comparing values
+     * @return the minimum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static int min(int[] self, IntUnaryOperator operator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "min");
+
+        int minV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            int v = self[i];
+            if (operator.applyAsInt(v) < operator.applyAsInt(minV)) {
+                minV = v;
+            }
+        }
+        return minV;
+    }
+
     /**
      * Adds min() method to long arrays.
      * <p/>
@@ -3683,6 +3950,71 @@ public class ArrayGroovyMethods extends DefaultGroovyMethodsSupport {
         return answer;
     }
 
+    /**
+     * Selects the minimum value found from the long array
+     * using the supplier LongBinaryOperator as a comparator to determine the minimum of any two values.
+     * <p>
+     * <pre class="groovyTestCase">
+     * long[] nums = [10L, -20L, 30L]
+     * assert -20L == nums.min{ n, m {@code ->} n {@code <=>} m }
+     * assert 10L == nums.min{ n, m {@code ->} n.abs() {@code <=>} m.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self       a long array
+     * @param comparator a comparator, i.e. returns a negative value if the first parameter is less than the second
+     * @return the minimum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static long min(long[] self, LongComparator comparator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "min");
+
+        long minV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            long v = self[i];
+            if (comparator.compare(v, minV) < 0) {
+                minV = v;
+            }
+        }
+        return minV;
+    }
+
+    /**
+     * Selects the minimum value found from the long array
+     * using the supplier LongUnaryOperator to determine the minimum of any two values.
+     * The operator is applied to each array element and the results are compared.
+     * <p>
+     * <pre class="groovyTestCase">
+     * long[] nums = [10L, -20L, 30L]
+     * assert -20L == nums.min{ it }
+     * assert 10L == nums.min{ it.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     a long array
+     * @param operator an operator that returns a long used for comparing values
+     * @return the minimum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static long min(long[] self, LongUnaryOperator operator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "min");
+
+        long minV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            long v = self[i];
+            if (operator.applyAsLong(v) < operator.applyAsLong(minV)) {
+                minV = v;
+            }
+        }
+        return minV;
+    }
+
     /**
      * Adds min() method to double arrays.
      * <p/>
@@ -3707,6 +4039,71 @@ public class ArrayGroovyMethods extends DefaultGroovyMethodsSupport {
         return answer;
     }
 
+    /**
+     * Selects the minimum value found from the double array
+     * using the supplier DoubleBinaryOperator as a comparator to determine the minimum of any two values.
+     * <p>
+     * <pre class="groovyTestCase">
+     * double[] nums = [10d, -20d, 30d]
+     * assert -20d == nums.min{ n, m {@code ->} n {@code <=>} m }
+     * assert 10d == nums.min{ n, m {@code ->} n.abs() {@code <=>} m.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self       a double array
+     * @param comparator a comparator, i.e. returns a negative value if the first parameter is less than the second
+     * @return the minimum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static double min(double[] self, DoubleComparator comparator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "min");
+
+        double minV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            double v = self[i];
+            if (comparator.compare(v, minV) < 0) {
+                minV = v;
+            }
+        }
+        return minV;
+    }
+
+    /**
+     * Selects the minimum value found from the double array
+     * using the supplier DoubleUnaryOperator to determine the minimum of any two values.
+     * The operator is applied to each array element and the results are compared.
+     * <p>
+     * <pre class="groovyTestCase">
+     * double[] nums = [10d, -20d, 30d]
+     * assert -20d == nums.min{ it }
+     * assert 10d == nums.min{ it.abs() }
+     * </pre>
+     * <p>
+     *
+     * @param self     a double array
+     * @param operator an operator that returns a double used for comparing values
+     * @return the minimum value
+     * @throws UnsupportedOperationException if the array is empty
+     * @since 5.0.0
+     */
+    @Incubating
+    public static double min(double[] self, DoubleUnaryOperator operator) {
+        Objects.requireNonNull(self);
+        throwUnsupportedOperationIfEmpty(self.length, "min");
+
+        double minV = self[0];
+        for (int i = 1; i < self.length; i++) {
+            double v = self[i];
+            if (operator.applyAsDouble(v) < operator.applyAsDouble(minV)) {
+                minV = v;
+            }
+        }
+        return minV;
+    }
+
     //-------------------------------------------------------------------------
     // minus
     //-------------------------------------------------------------------------


[groovy] 01/02: GROOVY-7319: Add primitive array min() and max()

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 916a1c5f602f54b634787db7f6e2315a5cf7ebb2
Author: Yu Kobayashi <yu...@accelart.jp>
AuthorDate: Tue Feb 24 09:57:06 2015 +0900

    GROOVY-7319: Add primitive array min() and max()
---
 .../groovy/util/function/DoubleComparator.java     | 34 ++++++++++++++++++++++
 .../java/groovy/util/function/IntComparator.java   | 34 ++++++++++++++++++++++
 .../java/groovy/util/function/LongComparator.java  | 34 ++++++++++++++++++++++
 src/main/java/groovy/util/function/package.html    | 29 ++++++++++++++++++
 4 files changed, 131 insertions(+)

diff --git a/src/main/java/groovy/util/function/DoubleComparator.java b/src/main/java/groovy/util/function/DoubleComparator.java
new file mode 100644
index 0000000000..052be71742
--- /dev/null
+++ b/src/main/java/groovy/util/function/DoubleComparator.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.util.function;
+
+/**
+ * A comparator of two double values.
+ */
+@FunctionalInterface
+public interface DoubleComparator {
+    /**
+     * Compares its two arguments for order.
+     *
+     * @param v1 The double value to compare.
+     * @param v2 The double value to compare.
+     * @return If v1 is less than v2, returns negative. If v1 equals to v2, returns zero. If v1 is greater than v2, returns positive.
+     */
+    int compare(double v1, double v2);
+}
diff --git a/src/main/java/groovy/util/function/IntComparator.java b/src/main/java/groovy/util/function/IntComparator.java
new file mode 100644
index 0000000000..c599473a41
--- /dev/null
+++ b/src/main/java/groovy/util/function/IntComparator.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.util.function;
+
+/**
+ * A comparator of two int values.
+ */
+@FunctionalInterface
+public interface IntComparator {
+    /**
+     * Compares its two arguments for order.
+     *
+     * @param v1 The int value to compare.
+     * @param v2 The int value to compare.
+     * @return If v1 is less than v2, returns negative. If v1 equals to v2, returns zero. If v1 is greater than v2, returns positive.
+     */
+    int compare(int v1, int v2);
+}
diff --git a/src/main/java/groovy/util/function/LongComparator.java b/src/main/java/groovy/util/function/LongComparator.java
new file mode 100644
index 0000000000..225cf472aa
--- /dev/null
+++ b/src/main/java/groovy/util/function/LongComparator.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package groovy.util.function;
+
+/**
+ * A comparator of two long values.
+ */
+@FunctionalInterface
+public interface LongComparator {
+    /**
+     * Compares its two arguments for order.
+     *
+     * @param v1 The long value to compare.
+     * @param v2 The long value to compare.
+     * @return If v1 is less than v2, returns negative. If v1 equals to v2, returns zero. If v1 is greater than v2, returns positive.
+     */
+    int compare(long v1, long v2);
+}
diff --git a/src/main/java/groovy/util/function/package.html b/src/main/java/groovy/util/function/package.html
new file mode 100644
index 0000000000..c2f4f5f3e0
--- /dev/null
+++ b/src/main/java/groovy/util/function/package.html
@@ -0,0 +1,29 @@
+<!--
+
+     Licensed to the Apache Software Foundation (ASF) under one
+     or more contributor license agreements.  See the NOTICE file
+     distributed with this work for additional information
+     regarding copyright ownership.  The ASF licenses this file
+     to you under the Apache License, Version 2.0 (the
+     "License"); you may not use this file except in compliance
+     with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing,
+     software distributed under the License is distributed on an
+     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+     KIND, either express or implied.  See the License for the
+     specific language governing permissions and limitations
+     under the License.
+
+-->
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>package groovy.util.function.*</title>
+  </head>
+  <body>
+    <p>Classes for functional interfaces.</p>
+  </body>
+</html>