LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.language.instantiable.IBaseInstantiable Class Referenceabstract

base structure of instantiable elements More...

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

Public Member Functions

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...
 

Protected Member Functions

 IBaseInstantiable (final List< IExecution > p_action, final Set< IAnnotation<?>> p_annotation, final int p_hash)
 ctor More...
 

Protected Attributes

final List< IExecutionm_action
 action list More...
 
final Map< IAnnotation.EType, IAnnotation<?> > m_annotation
 map with annotation (enum value for getting annotation object) More...
 

Private Member Functions

List< IFuzzyValue< Boolean > > executeparallel (final IContext p_context)
 execute plan parallel More...
 
List< IFuzzyValue< Boolean > > executesequential (final IContext p_context)
 execute plan sequential More...
 

Private Attributes

final int m_hash
 hash code More...
 

Static Private Attributes

static final long serialVersionUID = 8843291880722926104L
 serial id More...
 

Detailed Description

Definition at line 50 of file IBaseInstantiable.java.

Constructor & Destructor Documentation

◆ IBaseInstantiable()

org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.IBaseInstantiable ( final List< IExecution p_action,
final Set< IAnnotation<?>>  p_annotation,
final int  p_hash 
)
protected
Parameters
p_actionexecuted actions
p_annotationannotation map
p_hashhash code

Definition at line 78 of file IBaseInstantiable.java.

Member Function Documentation

◆ equals()

final boolean org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.equals ( final Object  p_object)

Definition at line 92 of file IBaseInstantiable.java.

References org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.hashCode().

+ Here is the call graph for this function:

◆ execute()

IFuzzyValue<Boolean> org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.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 113 of file IBaseInstantiable.java.

References org.lightjason.agentspeak.language.instantiable.plan.annotation.IAnnotation< T >.EType.ATOMIC, org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.executeparallel(), org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.executesequential(), org.lightjason.agentspeak.language.fuzzy.CFuzzyValue< T >.from(), and org.lightjason.agentspeak.language.instantiable.plan.annotation.IAnnotation< T >.EType.PARALLEL.

+ Here is the call graph for this function:

◆ executeparallel()

List<IFuzzyValue<Boolean> > org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.executeparallel ( final IContext  p_context)
private
Parameters
p_contextexecution context
Returns
list with execution results
Note
each element is executed

Definition at line 163 of file IBaseInstantiable.java.

References org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.m_action.

Referenced by org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.execute().

+ Here is the caller graph for this function:

◆ executesequential()

List<IFuzzyValue<Boolean> > org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.executesequential ( final IContext  p_context)
private
Parameters
p_contextexecution context
Returns
list with execution results
Note
stream is stopped iif an execution is failed

Definition at line 138 of file IBaseInstantiable.java.

References org.lightjason.agentspeak.language.fuzzy.IFuzzyValue< T >.fuzzy().

Referenced by org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hashCode()

final int org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.hashCode ( )

Definition at line 86 of file IBaseInstantiable.java.

References org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.m_hash.

Referenced by org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.equals().

+ Here is the caller graph for this function:

◆ instantiate()

final IContext org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.instantiate ( @Nonnull final IAgent<?>  p_agent,
@Nonnull final Stream< IVariable<?>>  p_variable 
)
Parameters
p_agentagent
p_variablevariable stream
Returns
individual context

Implements org.lightjason.agentspeak.language.instantiable.IInstantiable.

Definition at line 99 of file IBaseInstantiable.java.

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

+ Here is the call graph for this function:

◆ variables()

Stream<IVariable<?> > org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.variables ( )
Returns
variable stream (variables will be cloned on instantiation)

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

Definition at line 106 of file IBaseInstantiable.java.

References org.lightjason.agentspeak.language.execution.IExecution.variables().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_action

◆ m_annotation

final Map<IAnnotation.EType, IAnnotation<?> > org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.m_annotation
protected

◆ m_hash

final int org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.m_hash
private

◆ serialVersionUID

final long org.lightjason.agentspeak.language.instantiable.IBaseInstantiable.serialVersionUID = 8843291880722926104L
staticprivate

Definition at line 55 of file IBaseInstantiable.java.