|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object groovyx.gpars.AbstractPAWrapper
abstract class AbstractPAWrapper extends java.lang.Object
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. |
T
|
max()
Finds in parallel the maximum of all values in the collection. |
T
|
max(groovy.lang.Closure cl)
Finds in parallel the maximum of all values in the collection. |
T
|
min()
Finds in parallel the minimum of all values in the collection. |
T
|
min(groovy.lang.Closure cl)
Finds in parallel the minimum of all values in the collection. |
T
|
reduce(groovy.lang.Closure cl)
Performs a parallel reduce operation. |
T
|
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. |
T
|
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), java.lang.Object#wait(), java.lang.Object#wait(long, int), 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 T max()
final T max(groovy.lang.Closure cl)
cl
- A one or two-argument closure
final T min()
final T min(groovy.lang.Closure cl)
cl
- A one or two-argument closure
final T 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 T 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 T sum()
Copyright © 2008–2010 Václav Pech. All Rights Reserved.