de.cesr.lara.components.preprocessor.impl
Class LAbstractPpComp<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>

java.lang.Object
  extended by de.cesr.lara.components.preprocessor.impl.LAbstractPpComp<A,BO>
Type Parameters:
A -
BO -
All Implemented Interfaces:
LaraAbstractEventSubscriber, LaraInternalEventSubscriber, LaraPreprocessorComp<A,BO>
Direct Known Subclasses:
LCompleteBoCollector, LContributingBoCollector, LDefaultBOUpdater, LDefaultDecisionModeSelector, LDelegatingBoPreselector, LDeliberativeDecisionModeSelector, LOmitZeroContributingBOCollector, LPseudoPrefereceUpdater

public abstract class LAbstractPpComp<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>
extends Object
implements LaraPreprocessorComp<A,BO>


Constructor Summary
LAbstractPpComp()
           
 
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.
protected  void logBOs(Logger logger, Collection<BO> bos, String desc, A agent)
          TODO check Logs BOs to agentLogger (.de.cesr.lara.components.preprocessor.impl.LPreprocessor) if its not null and to logger if debug is enabled otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cesr.lara.components.eventbus.LaraInternalEventSubscriber
onInternalEvent
 

Constructor Detail

LAbstractPpComp

public LAbstractPpComp()
Method Detail

castEvent

public <E extends LaraPpEvent> E castEvent(Class<E> clazz,
                                           LaraEvent event)
Description copied from interface: LaraPreprocessorComp
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.

Specified by:
castEvent in interface LaraPreprocessorComp<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>
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
See Also:
LaraPreprocessorComp.castEvent(java.lang.Class, de.cesr.lara.components.eventbus.events.LaraEvent)

logBOs

protected void logBOs(Logger logger,
                      Collection<BO> bos,
                      String desc,
                      A agent)
TODO check Logs BOs to agentLogger (.de.cesr.lara.components.preprocessor.impl.LPreprocessor) if its not null and to logger if debug is enabled otherwise.

Parameters:
bos - BOs to log
desc - description that comments to BOs origin
agent -