Package groovyx.gpars.extra166y.Ops

Examples of groovyx.gpars.extra166y.Ops.LongReducer


     * Returns a reducer returning the maximum of two long elements,
     * using the given comparator.
     */
    public static LongReducer longMaxReducer
        (final LongComparator comparator) {
        return new LongReducer() {
                public long op(long a, long b) {
                    return (comparator.compare(a, b) >= 0) ? a : b;
                }
            };
    }
View Full Code Here


     * Returns a reducer returning the minimum of two long elements,
     * using the given comparator.
     */
    public static LongReducer longMinReducer
        (final LongComparator comparator) {
        return new LongReducer() {
                public long op(long a, long b) {
                    return (comparator.compare(a, b) <= 0) ? a : b;
                }
            };
    }
View Full Code Here

TOP

Related Classes of groovyx.gpars.extra166y.Ops.LongReducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.