de.cesr.lara.components.preprocessor
Interface LaraPreprocessorComp<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>

Type Parameters:
A - agent type
All Superinterfaces:
LaraAbstractEventSubscriber, LaraInternalEventSubscriber
All Known Subinterfaces:
LaraBOCollector<A,BO>, LaraBOPreselector<A,BO>, LaraBOUtilityUpdater<A,BO>, LaraDecisionModeSelector<A,BO>, LaraPreferenceUpdater<A,BO>
All Known Implementing Classes:
DecisionModeSelector, LAbstractPpComp, LCompleteBoCollector, LContributingBoCollector, LDefaultBOUpdater, LDefaultDecisionModeSelector, LDelegatingBoPreselector, LDeliberativeDecisionModeSelector, LOmitZeroContributingBOCollector, LPseudoPrefereceUpdater, MyDecisionModeSelector, MyModeSelector

public interface LaraPreprocessorComp<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>
extends LaraInternalEventSubscriber

Interface for all preprocessor components. This is necessary as a common super type for handling generic components in the LaraPreprocessor.


Method Summary
<E extends LaraPpEvent>
E
castEvent(Class<E> clazz, LaraEvent event)
          Checks whether the given object is assignable to references of the type of the given class object.
 
Methods inherited from interface de.cesr.lara.components.eventbus.LaraInternalEventSubscriber
onInternalEvent
 

Method Detail

castEvent

<E extends LaraPpEvent> E castEvent(Class<E> clazz,
                                    LaraEvent event)
Checks whether the given object is assignable to references of the type of the given class object. It returns a version of the given object that is casted to the given type. Otherwise, it raises an exception.

Type Parameters:
E - The type of event the given event shall be checked for
Parameters:
clazz - class object of the type that shall be checked for
event - the event that whose type is checked
Returns:
the event casted to the given type