LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.language.instantiable.plan.CPlan Class Reference

plan structure More...

+ Inheritance diagram for org.lightjason.agentspeak.language.instantiable.plan.CPlan:
+ Collaboration diagram for org.lightjason.agentspeak.language.instantiable.plan.CPlan:

Public Member Functions

 CPlan ( @Nonnull final ITrigger p_event, @Nonnull final List< IExecution > p_body, @Nonnull final Set< IAnnotation<?>> p_annotation)
 ctor More...
 
 CPlan ( @Nonnull final ITrigger p_event, @Nonnull final IExpression p_condition, @Nonnull final List< IExecution > p_body, @Nonnull final Set< IAnnotation<?>> p_annotation)
 ctor More...
 
final IFuzzyValue< Boolean > condition (final IContext p_context)
 execute the plan condition More...
 
final IFuzzyValue< Boolean > execute (final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
 defines a plan-body operation More...
 
final String toString ()
 
final ITrigger trigger ()
 returns the trigger event More...
 
final Stream< IVariable<?> > variables ()
 returns a stream with all used variables More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.language.instantiable.IBaseInstantiable
final boolean equals (final Object p_object)
 
IFuzzyValue< Boolean > execute (final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
 defines a plan-body operation More...
 
final int hashCode ()
 
final IContext instantiate ( @Nonnull final IAgent<?> p_agent, @Nonnull final Stream< IVariable<?>> p_variable)
 creates an individual execution context More...
 
Stream< IVariable<?> > variables ()
 returns a stream with all used variables More...
 

Private Attributes

final IExpression m_condition
 execution condition / expression More...
 
final ITrigger m_triggerevent
 trigger event More...
 

Static Private Attributes

static final long serialVersionUID = -8130277494195919583L
 serial id More...
 

Additional Inherited Members

- Public Attributes inherited from org.lightjason.agentspeak.language.instantiable.plan.IPlan
IPlan EMPTY
 empty plan More...
 
- Protected Member Functions inherited from org.lightjason.agentspeak.language.instantiable.IBaseInstantiable
 IBaseInstantiable (final List< IExecution > p_action, final Set< IAnnotation<?>> p_annotation, final int p_hash)
 ctor More...
 
- Protected Attributes inherited from org.lightjason.agentspeak.language.instantiable.IBaseInstantiable
final List< IExecutionm_action
 action list More...
 
final Map< IAnnotation.EType, IAnnotation<?> > m_annotation
 map with annotation (enum value for getting annotation object) More...
 

Detailed Description

Definition at line 53 of file language/instantiable/plan/CPlan.java.

Constructor & Destructor Documentation

◆ CPlan() [1/2]

org.lightjason.agentspeak.language.instantiable.plan.CPlan.CPlan ( @Nonnull final ITrigger  p_event,
@Nonnull final List< IExecution p_body,
@Nonnull final Set< IAnnotation<?>>  p_annotation 
)
Parameters
p_eventtrigger event
p_bodyplan body
p_annotationannotations

Definition at line 76 of file language/instantiable/plan/CPlan.java.

References org.lightjason.agentspeak.language.execution.expression.IExpression.EMPTY.

◆ CPlan() [2/2]

org.lightjason.agentspeak.language.instantiable.plan.CPlan.CPlan ( @Nonnull final ITrigger  p_event,
@Nonnull final IExpression  p_condition,
@Nonnull final List< IExecution p_body,
@Nonnull final Set< IAnnotation<?>>  p_annotation 
)
Parameters
p_eventtrigger event
p_conditionexecution condition
p_bodyplan body
p_annotationannotations

Definition at line 89 of file language/instantiable/plan/CPlan.java.

References org.lightjason.agentspeak.language.CCommon.streamconcat().

+ Here is the call graph for this function:

Member Function Documentation

◆ condition()

final IFuzzyValue<Boolean> org.lightjason.agentspeak.language.instantiable.plan.CPlan.condition ( final IContext  p_context)
Parameters
p_contextexecution context
Returns
execution result

Implements org.lightjason.agentspeak.language.instantiable.plan.IPlan.

Definition at line 134 of file language/instantiable/plan/CPlan.java.

References org.lightjason.agentspeak.language.execution.IExecution.execute(), and org.lightjason.agentspeak.language.fuzzy.CFuzzyValue< T >.from().

+ Here is the call graph for this function:

◆ execute()

final IFuzzyValue<Boolean> org.lightjason.agentspeak.language.instantiable.plan.CPlan.execute ( final boolean  p_parallel,
@Nonnull final IContext  p_context,
@Nonnull final List< ITerm p_argument,
@Nonnull final List< ITerm p_return 
)
Parameters
p_parallelparallel execution
p_contextcurrent execution context
p_argumentparameter of the action
p_returnreturn values
Returns
fuzzy boolean

Implements org.lightjason.agentspeak.language.execution.IExecution.

Definition at line 119 of file language/instantiable/plan/CPlan.java.

References org.lightjason.agentspeak.language.instantiable.plan.trigger.ITrigger.EType.DELETEGOAL, org.lightjason.agentspeak.language.instantiable.plan.trigger.CTrigger.from(), org.lightjason.agentspeak.language.instantiable.plan.trigger.ITrigger.literal(), and org.lightjason.agentspeak.language.ILiteral.unify().

+ Here is the call graph for this function:

◆ toString()

◆ trigger()

final ITrigger org.lightjason.agentspeak.language.instantiable.plan.CPlan.trigger ( )

◆ variables()

Member Data Documentation

◆ m_condition

final IExpression org.lightjason.agentspeak.language.instantiable.plan.CPlan.m_condition
private

Definition at line 66 of file language/instantiable/plan/CPlan.java.

◆ m_triggerevent

final ITrigger org.lightjason.agentspeak.language.instantiable.plan.CPlan.m_triggerevent
private

◆ serialVersionUID

final long org.lightjason.agentspeak.language.instantiable.plan.CPlan.serialVersionUID = -8130277494195919583L
staticprivate

Definition at line 58 of file language/instantiable/plan/CPlan.java.