|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object groovyx.gpars.pa.AbstractPAWrapper
abstract class AbstractPAWrapper
Wraps a ParallelArray instance in map/reduce operation chains.
Property Summary | |
---|---|
java.lang.Object |
pa
The wrapper ParallelArray instance |
Constructor Summary | |
AbstractPAWrapper(java.lang.Object pa)
Creates an instance wrapping the supplied instance of ParallelArray |
Method Summary | |
---|---|
java.util.Map
|
combine(java.lang.Object initialValue, groovy.lang.Closure accumulation)
Performs a parallel combine operation. |
java.util.Map
|
combineImpl(groovy.lang.Closure initialValue, groovy.lang.Closure accumulation)
|
java.util.Map
|
combineImpl(java.lang.Object extractKey, java.lang.Object extractValue, groovy.lang.Closure initialValue, groovy.lang.Closure accumulation)
|
AbstractPAWrapper
|
filter(groovy.lang.Closure cl)
Filters concurrently elements in the collection based on the outcome of the supplied function on each of the elements. |
java.lang.Object
|
getCollection()
Reconstructs a collection from the wrapped ParallelArray instance |
java.util.Map
|
groupBy(groovy.lang.Closure cl)
Performs parallel groupBy operation. |
AbstractPAWrapper
|
map(groovy.lang.Closure cl)
Applies concurrently the supplied function to all elements in the collection, returning a collection containing the transformed values. |
java.lang.Object
|
max()
Finds in parallel the maximum of all values in the collection. |
java.lang.Object
|
max(groovy.lang.Closure cl)
Finds in parallel the maximum of all values in the collection. |
java.lang.Object
|
min()
Finds in parallel the minimum of all values in the collection. |
java.lang.Object
|
min(groovy.lang.Closure cl)
Finds in parallel the minimum of all values in the collection. |
java.lang.Object
|
reduce(groovy.lang.Closure cl)
Performs a parallel reduce operation. |
java.lang.Object
|
reduce(java.lang.Object seed, groovy.lang.Closure cl)
Performs a parallel reduce operation. |
int
|
size()
Size of the collection |
AbstractPAWrapper
|
sort(groovy.lang.Closure cl = { it })
Returns a sorted parallel collection If the supplied closure takes two arguments it is used directly as a comparator. |
java.lang.Object
|
sum()
Summarizes all elements of the collection in parallel using the "plus()" operator of the elements |
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() |
Property Detail |
---|
final java.lang.Object pa
Constructor Detail |
---|
AbstractPAWrapper(java.lang.Object pa)
Method Detail |
---|
java.util.Map combine(java.lang.Object initialValue, groovy.lang.Closure accumulation)
initialValue
- The initial value for an accumulator. Since it will be used repeatedly, it should be either an unmodifiable value, a cloneable instance or a closure returning a fresh initial/empty accumulator each time requestedaccumulator
- A two-argument closure, first argument being the accumulator and second holding the currently processed value. The closure is supposed to returned a modified accumulator after accumulating the value.
java.util.Map combineImpl(groovy.lang.Closure initialValue, groovy.lang.Closure accumulation)
java.util.Map combineImpl(java.lang.Object extractKey, java.lang.Object extractValue, groovy.lang.Closure initialValue, groovy.lang.Closure accumulation)
AbstractPAWrapper filter(groovy.lang.Closure cl)
A
- closure indicating whether to propagate the given element into the filtered collection
final java.lang.Object getCollection()
java.util.Map groupBy(groovy.lang.Closure cl)
cl
- A single-argument closure returning the value to use for grouping (the key in the resulting map).
final AbstractPAWrapper map(groovy.lang.Closure cl)
A
- closure calculating a transformed value from the original one
final java.lang.Object max()
final java.lang.Object max(groovy.lang.Closure cl)
cl
- A one or two-argument closure
final java.lang.Object min()
final java.lang.Object min(groovy.lang.Closure cl)
cl
- A one or two-argument closure
final java.lang.Object reduce(groovy.lang.Closure cl)
cl
- A two-argument closure merging two elements into one. The return value of the closure will replace the original two elements.
final java.lang.Object reduce(java.lang.Object seed, groovy.lang.Closure cl)
cl
- A two-argument closure merging two elements into one. The return value of the closure will replace the original two elements.
final int size()
final AbstractPAWrapper sort(groovy.lang.Closure cl = { it })
cl
- A one or two-argument closure
final java.lang.Object sum()
Copyright © 2008–2013 Václav Pech. All Rights Reserved.