de.cesr.lara.components.preprocessor.impl
Class LAbstractPpComp<A extends LaraAgent<? super A,?>,BO extends LaraBehaviouralOption<?,?>>
java.lang.Object
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>
Method Summary |
|
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 |
LAbstractPpComp
public LAbstractPpComp()
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 forevent
- 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 logdesc
- description that comments to BOs originagent
-