public class EqualsPreprocessor extends PreprocessorAdapter
Preprocessor.Processor<T extends Event>
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Event,Preprocessor.Processor<? extends Event>> |
processors
The procesors.
|
logger
Constructor and Description |
---|
EqualsPreprocessor(java.lang.String name)
Create the object.
|
Modifier and Type | Method and Description |
---|---|
<T extends Event> |
addProcessor(T event,
Preprocessor.Processor<T> processor)
Add a new processor.
|
protected Preprocessor.Processor |
findProcessor(Event event)
Find appropriate processor for an event.
|
process
close, getName, start
private final java.util.Map<Event,Preprocessor.Processor<? extends Event>> processors
public EqualsPreprocessor(java.lang.String name)
name
- the name of the event processorpublic <T extends Event> void addProcessor(T event, Preprocessor.Processor<T> processor) throws FsmException
event
- the eventprocessor
- the processorFsmException
- if the processor is already definedprotected Preprocessor.Processor findProcessor(Event event)
PreprocessorAdapter
findProcessor
in class PreprocessorAdapter
event
- the eventCopyright 2013 Michal Turek, AnotherFSM.