Class ListCollector<E>
- java.lang.Object
-
- com.tagtraum.jipes.AbstractSignalProcessor<E,List<E>>
-
- com.tagtraum.audiokern.audioprocessor.ListCollector<E>
-
- All Implemented Interfaces:
SignalProcessor<E,List<E>>
,SignalPullProcessor<E,List<E>>
,SignalSource<List<E>>
public class ListCollector<E> extends AbstractSignalProcessor<E,List<E>>
Collects objects in a list.
In push mode, downstream processors are handed the list whenflush()
is called. In pull mode, the upstream generator is read completely, it's elements are collected in a list that is then returned whenread()
is called.- Author:
- Hendrik Schreiber
- See Also:
FloatCollector
-
-
Field Summary
-
Fields inherited from class com.tagtraum.jipes.AbstractSignalProcessor
lastOut, signalProcessorSupport
-
-
Constructor Summary
Constructors Constructor Description ListCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
List<E>
getOutput()
void
process(E element)
protected List<E>
processNext(E element)
List<E>
read()
void
reset()
-
Methods inherited from class com.tagtraum.jipes.AbstractSignalProcessor
connectTo, connectTo, connectTo, disconnectFrom, getConnectedProcessors, getConnectedSource, getId, setId
-
-
-
-
Method Detail
-
processNext
protected List<E> processNext(E element) throws IOException
- Specified by:
processNext
in classAbstractSignalProcessor<E,List<E>>
- Throws:
IOException
-
reset
public void reset()
- Specified by:
reset
in interfaceSignalSource<E>
- Overrides:
reset
in classAbstractSignalProcessor<E,List<E>>
-
process
public void process(E element) throws IOException
- Specified by:
process
in interfaceSignalProcessor<E,List<E>>
- Overrides:
process
in classAbstractSignalProcessor<E,List<E>>
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceSignalProcessor<E,List<E>>
- Overrides:
flush
in classAbstractSignalProcessor<E,List<E>>
- Throws:
IOException
-
getOutput
public List<E> getOutput() throws IOException
- Specified by:
getOutput
in interfaceSignalProcessor<E,List<E>>
- Overrides:
getOutput
in classAbstractSignalProcessor<E,List<E>>
- Throws:
IOException
-
read
public List<E> read() throws IOException
- Specified by:
read
in interfaceSignalSource<E>
- Overrides:
read
in classAbstractSignalProcessor<E,List<E>>
- Throws:
IOException
-
-