Package groovyx.gpars.pa

Examples of groovyx.gpars.pa.ClosurePredicate


     *     assert result == 3
     * }
     * </pre>
     */
    public static int countParallel(final Collection collection, final Closure filter) {
        return GParsPoolUtilHelper.createPAFromCollection(collection, retrievePool()).withFilter(new ClosurePredicate(filter)).size();
    }
View Full Code Here


     *     assert result == 2
     * }
     * </pre>
     */
    public static int countParallel(final Object collection, final Closure filter) {
        return GParsPoolUtilHelper.createPA(collection, retrievePool()).withFilter(new ClosurePredicate(filter)).size();
    }
View Full Code Here

     *     assert ![1, 2, 3].anyParallel {Number number -&gt; number &gt; 3}
     * }
     * </pre>
     */
    public static boolean anyParallel(final Collection collection, final Closure cl) {
        return GParsPoolUtilHelper.createPAFromCollection(collection, retrievePool()).withFilter(new ClosurePredicate(cl)).any() != null;
    }
View Full Code Here

     *     assert ![1, 2, 3].anyParallel {Number number -&gt; number &gt; 3}
     * }
     * </pre>
     */
    public static boolean anyParallel(final Object collection, final Closure cl) {
        return GParsPoolUtilHelper.createPA(collection, retrievePool()).withFilter(new ClosurePredicate(cl)).any() != null;
    }
View Full Code Here

     * }
     * </pre>
     */
    public static boolean anyParallel(final Map collection, final Closure cl) {
        final Closure mapClosure = buildClosureForMaps(cl);
        return createPA(collection, retrievePool()).withFilter(new ClosurePredicate(mapClosure)).any() != null;
    }
View Full Code Here

TOP

Related Classes of groovyx.gpars.pa.ClosurePredicate

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.