|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.core.QtConcurrent
public class QtConcurrent
Nested Class Summary | |
---|---|
static interface |
QtConcurrent.FilteredFunctor<T>
An implementation of this interface is given to one of QtConcurrent's filtered() methods. |
static interface |
QtConcurrent.MapFunctor<T>
An implemetation of this interface is given one to QtConcurrent's map() methods. |
static interface |
QtConcurrent.MappedFunctor<U,T>
Implement this interface to perform a mapped operation. |
static interface |
QtConcurrent.ReducedFunctor<U,T>
Implement this interface in order to perform a reduce operation. |
static class |
QtConcurrent.ReduceOption
|
static class |
QtConcurrent.ReduceOptions
|
static class |
QtConcurrent.ThreadFunctionResult
|
Constructor Summary | |
---|---|
QtConcurrent()
|
Method Summary | ||
---|---|---|
static
|
blockingFiltered(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor)
Calls filterFunctor's filtered() method once for each item in sequence and returns a new Sequence of kept items. |
|
static
|
blockingFilteredReduced(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor,
QtConcurrent.ReducedFunctor<U,T> reducedFunctor)
This is an overloaded method provided for convenience. |
|
static
|
blockingFilteredReduced(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor,
QtConcurrent.ReducedFunctor<U,T> reducedFunctor,
QtConcurrent.ReduceOption... options)
Calls filterFunction once for each item in sequence. |
|
static
|
blockingFilteredReduced(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor,
QtConcurrent.ReducedFunctor<U,T> reducedFunctor,
QtConcurrent.ReduceOptions options)
Calls filterFunction once for each item in sequence. |
|
static
|
blockingMap(java.util.Collection<T> sequence,
QtConcurrent.MapFunctor<T> functor)
Calls function once for each item in sequence. |
|
static
|
blockingMapped(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<U,T> functor)
Calls function once for each item in sequence and returns a future with each mapped item as a result. |
|
static
|
blockingMappedReduced(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<V,T> functor,
QtConcurrent.ReducedFunctor<U,V> reducedFunctor)
This is an overloaded method provided for convenience. |
|
static
|
blockingMappedReduced(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<V,T> functor,
QtConcurrent.ReducedFunctor<U,V> reducedFunctor,
QtConcurrent.ReduceOption... options)
Calls mapFunction once for each item in sequence. |
|
static
|
blockingMappedReduced(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<V,T> functor,
QtConcurrent.ReducedFunctor<U,V> reducedFunctor,
QtConcurrent.ReduceOptions options)
Calls mapFunction once for each item in sequence. |
|
static
|
filtered(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor)
Calls filterFunctor's filtered() method once for each item in sequence and returns a new Sequence of kept items. |
|
static
|
filteredReduced(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor,
QtConcurrent.ReducedFunctor<U,T> reducedFunctor)
This is an overloaded method provided for convenience. |
|
static
|
filteredReduced(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor,
QtConcurrent.ReducedFunctor<U,T> reducedFunctor,
QtConcurrent.ReduceOption... options)
Calls filterFunction once for each item in sequence. |
|
static
|
filteredReduced(java.util.Collection<T> sequence,
QtConcurrent.FilteredFunctor<T> filteredFunctor,
QtConcurrent.ReducedFunctor<U,T> reducedFunctor,
QtConcurrent.ReduceOptions options)
Calls filterFunction once for each item in sequence. |
|
static
|
map(java.util.Collection<T> sequence,
QtConcurrent.MapFunctor<T> functor)
Calls function once for each item in sequence. |
|
static
|
mapped(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<U,T> functor)
Calls function once for each item in sequence and returns a future with each mapped item as a result. |
|
static
|
mappedReduced(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<V,T> functor,
QtConcurrent.ReducedFunctor<U,V> reducedFunctor)
This is an overloaded method provided for convenience. |
|
static
|
mappedReduced(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<V,T> functor,
QtConcurrent.ReducedFunctor<U,V> reducedFunctor,
QtConcurrent.ReduceOption... options)
This is an overloaded method provided for convenience. |
|
static
|
mappedReduced(java.util.Collection<T> sequence,
QtConcurrent.MappedFunctor<V,T> functor,
QtConcurrent.ReducedFunctor<U,V> reducedFunctor,
QtConcurrent.ReduceOptions options)
Calls mapFunction once for each item in sequence. |
|
static
|
run(java.lang.Object _this,
java.lang.reflect.Method m,
java.lang.Object... args)
Executes the method m through the QtConcurrent framework with the given arguments. |
|
static QFutureVoid |
runVoidMethod(java.lang.Object _this,
java.lang.reflect.Method m,
java.lang.Object... args)
Executes the method m with the given arguments using the QtConcurrent framework. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QtConcurrent()
Method Detail |
---|
public static <T> QFutureVoid map(java.util.Collection<T> sequence, QtConcurrent.MapFunctor<T> functor)
public static <T> void blockingMap(java.util.Collection<T> sequence, QtConcurrent.MapFunctor<T> functor)
public static <U,T> QFuture<U> mapped(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<U,T> functor)
public static <U,T> java.util.List<U> blockingMapped(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<U,T> functor)
public static <U,V,T> QFuture<U> mappedReduced(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<V,T> functor, QtConcurrent.ReducedFunctor<U,V> reducedFunctor)
It is equivalent of mappedReduced(sequence, functor, reducedFunctor, ReduceOption.UnorderedReduce, ReduceOption.SequentialReduce)
public static <U,V,T> QFuture<U> mappedReduced(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<V,T> functor, QtConcurrent.ReducedFunctor<U,V> reducedFunctor, QtConcurrent.ReduceOption... options)
Note that while mapFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is determined by reduceOptions.
public static <U,V,T> QFuture<U> mappedReduced(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<V,T> functor, QtConcurrent.ReducedFunctor<U,V> reducedFunctor, QtConcurrent.ReduceOptions options)
Note that while mapFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is determined by reduceOptions.
public static <U,V,T> U blockingMappedReduced(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<V,T> functor, QtConcurrent.ReducedFunctor<U,V> reducedFunctor)
It is equivalent of calling blockingMappedReduced(sequence, functor, reducedFunctor, ReduceOption.UnorderedReduce, ReduceOption.SequentialReduce)
public static <U,V,T> U blockingMappedReduced(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<V,T> functor, QtConcurrent.ReducedFunctor<U,V> reducedFunctor, QtConcurrent.ReduceOption... options)
Note that while mapFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is determined by reduceOptions.
Note: This function will block until all items in the sequence have been processed.
public static <U,V,T> U blockingMappedReduced(java.util.Collection<T> sequence, QtConcurrent.MappedFunctor<V,T> functor, QtConcurrent.ReducedFunctor<U,V> reducedFunctor, QtConcurrent.ReduceOptions options)
Note that while mapFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is determined by reduceOptions.
Note: This function will block until all items in the sequence have been processed.
public static <T> QFuture<T> filtered(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor)
public static <T> java.util.List<T> blockingFiltered(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor)
public static <U,T> QFuture<U> filteredReduced(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor, QtConcurrent.ReducedFunctor<U,T> reducedFunctor)
public static <U,T> QFuture<U> filteredReduced(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor, QtConcurrent.ReducedFunctor<U,T> reducedFunctor, QtConcurrent.ReduceOption... options)
Note that while filterFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is undefined if reduceOptions is QtConcurrent::UnorderedReduce. If reduceOptions is QtConcurrent::OrderedReduce, reduceFunction is called in the order of the original sequence.
public static <U,T> QFuture<U> filteredReduced(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor, QtConcurrent.ReducedFunctor<U,T> reducedFunctor, QtConcurrent.ReduceOptions options)
Note that while filterFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is undefined if reduceOptions is QtConcurrent::UnorderedReduce. If reduceOptions is QtConcurrent::OrderedReduce, reduceFunction is called in the order of the original sequence.
public static <U,T> U blockingFilteredReduced(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor, QtConcurrent.ReducedFunctor<U,T> reducedFunctor)
public static <U,T> U blockingFilteredReduced(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor, QtConcurrent.ReducedFunctor<U,T> reducedFunctor, QtConcurrent.ReduceOption... options)
Note that while filterFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is undefined if reduceOptions is QtConcurrent::UnorderedReduce. If reduceOptions is QtConcurrent::OrderedReduce, reduceFunction is called in the order of the original sequence.
public static <U,T> U blockingFilteredReduced(java.util.Collection<T> sequence, QtConcurrent.FilteredFunctor<T> filteredFunctor, QtConcurrent.ReducedFunctor<U,T> reducedFunctor, QtConcurrent.ReduceOptions options)
Note that while filterFunction is called concurrently, only one thread at a time will call reduceFunction. The order in which reduceFunction is called is undefined if reduceOptions is QtConcurrent::UnorderedReduce. If reduceOptions is QtConcurrent::OrderedReduce, reduceFunction is called in the order of the original sequence.
public static <T> QFuture<T> run(java.lang.Object _this, java.lang.reflect.Method m, java.lang.Object... args)
public static QFutureVoid runVoidMethod(java.lang.Object _this, java.lang.reflect.Method m, java.lang.Object... args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |