|
org.codehaus.gpars | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovyx.gpars.util.PAUtils
@java.lang.SuppressWarningsreturn collection; public abstract class PAUtils
Handy methods build PA from different types
| Constructor Summary | |
PAUtils()
|
|
| Method Summary | |
|---|---|
static groovy.lang.Closure
|
buildClosureForMaps(groovy.lang.Closure cl)
|
static groovy.lang.Closure
|
buildClosureForMapsWithIndex(groovy.lang.Closure cl)
If the passed-in closure expects three arguments, it is considered to be a map-iterative_with_index code and is then wrapped with a two-argument closure, which unwraps the key:value pairs for the original closure. |
static java.util.Map
|
buildResultMap(java.util.Collection result)
Builds a resulting map out of an map entry collection |
static java.lang.String[]
|
createArray(java.lang.CharSequence value)
|
static java.util.Map$Entry[]
|
createArray(java.util.Map map)
|
static java.util.Collection
|
createCollection(java.lang.Iterable object)
|
static java.util.Collection
|
createCollection(java.util.Iterator iterator)
|
static java.util.Comparator
|
createComparator(groovy.lang.Closure handler)
|
static groovy.lang.Closure
|
createGroupByClosure(groovy.lang.Closure cl, java.util.concurrent.ConcurrentMap map)
Creates a closure that will insert elements in the appropriate group |
static void
|
evaluateArguments(Pool pool, java.lang.Object[] args, int current, java.util.List soFarArgs, DataflowVariable result, groovy.lang.Closure original, boolean pooledThreadFlag)
Performs a single step in the evaluation of parameters passed into an asynchronous function |
| Methods inherited from class java.lang.Object | |
|---|---|
| java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
| Constructor Detail |
|---|
PAUtils()
| Method Detail |
|---|
public static groovy.lang.Closure buildClosureForMaps(groovy.lang.Closure cl)
public static groovy.lang.Closure buildClosureForMapsWithIndex(groovy.lang.Closure cl)
cl - The closure to use for parallel methods
public static java.util.Map buildResultMap(java.util.Collection result)
result - The collection containing map entries
public static java.lang.String[] createArray(java.lang.CharSequence value)
public static java.util.Map$Entry[] createArray(java.util.Map map)
public static java.util.Collection createCollection(java.lang.Iterable object)
public static java.util.Collection createCollection(java.util.Iterator iterator)
public static java.util.Comparator createComparator(groovy.lang.Closure handler)
public static groovy.lang.Closure createGroupByClosure(groovy.lang.Closure cl, java.util.concurrent.ConcurrentMap map)
cl - The distinction closuremap - The map of groups to contribute to
@java.lang.SuppressWarnings} public static void evaluateArguments(Pool pool, java.lang.Object[] args, int current, java.util.List soFarArgs, DataflowVariable result, groovy.lang.Closure original, boolean pooledThreadFlag)
pool - The thread pool to useargs - The list of original argumentscurrent - The index of the current argument to evaluatesoFarArgs - A list of arguments evaluated so farresult - The DFV expecting the function result to be bound to once calculatedoriginal - The original non-asynchronous function to invoke once all arguments are availablepooledThreadFlag - Indicates, whether we now run in a pooled thread so we don't have to schedule the original function invocation, once all arguments have been bound
Copyright © 2008–2013 Václav Pech. All Rights Reserved.