|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A
- the agent type of the implementing classBO
- the type of behavioural options the implementing agent class works
withpublic interface LaraAgent<A extends LaraAgent<A,BO>,BO extends LaraBehaviouralOption<?,? extends BO>>
The class uses recursive generics since the LaraAgentComponent
requires the type of agent. See Maurice, M. N. & Wadler, P. Java Generics and
Collections O'Reilly Media, 2006, p. 133ff.
See also
http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.5 A
Type parameter cannot be generic. Furthermore, one cannot define more than
one type in one ActualTypeArgument (T). So one needs to workaround with
two ActualTypeArguments declarations (S extends LaraAgent, T extends
Interface).
Agents also work with BOs that require (only) a super class of their (agent)
class.
Method Summary | |
---|---|
String |
getAgentId()
Get the custom agent id. |
LaraAgentComponent<A,BO> |
getLaraComp()
Returns the LaraAgentComponent of this agent. |
Methods inherited from interface de.cesr.lara.components.eventbus.LaraEventSubscriber |
---|
onEvent |
Method Detail |
---|
String getAgentId()
LaraAgentComponent<A,BO> getLaraComp()
LaraAgentComponent
of this agent.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |