LightJason - AgentSpeak(L++)
org.lightjason.agentspeak.action.builtin.generic.CPrint Class Reference

action for sum of elements. More...

+ Inheritance diagram for org.lightjason.agentspeak.action.builtin.generic.CPrint:
+ Collaboration diagram for org.lightjason.agentspeak.action.builtin.generic.CPrint:

Classes

class  IFormatter
 formating class More...
 
interface  ISupplier
 interface of a serializable supplier More...
 

Public Member Functions

 CPrint () throws Exception
 ctor More...
 
 CPrint ( @Nonnull final ISupplier< PrintStream > p_streamsupplier) throws Exception
 ctor More...
 
 CPrint ( @Nonnull final ISupplier< PrintStream > p_streamsupplier, @Nonnull final String p_seperator, @Nullable final IFormatter<?>... p_formatter) throws Exception
 ctor 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 Set< IFormatter<?> > formatter ()
 returns the formatter list More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
final IPath name ()
 returns the name with path of the action More...
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IBaseAction
final boolean equals (final Object p_object)
 
final int hashCode ()
 
final String toString ()
 
- Public Member Functions inherited from org.lightjason.agentspeak.action.IAction
default int minimalArgumentNumber ()
 minimum number of arguments More...
 
default Stream< IVariable<?> > variables ()
 returns a stream with all used variables More...
 

Private Member Functions

String format ( @Nonnull final Collection< ITerm > p_argument)
 format definition More...
 
void readObject (final ObjectInputStream p_stream) throws Exception
 deserializable call More...
 

Private Attributes

final Set< IFormatter<?> > m_formatter
 list mit individual format calls More...
 
final String m_seperator
 argument seperator More...
 
transient PrintStream m_stream
 output stream More...
 
final ISupplier< PrintStream > m_streamsupplier
 supplier of print stream field More...
 

Static Private Attributes

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

Additional Inherited Members

- Public Attributes inherited from org.lightjason.agentspeak.action.IAction
long serialVersionUID = -6374480398439703170L
 serial id More...
 
- Protected Member Functions inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
 IBuiltinAction ()
 ctor More...
 
 IBuiltinAction (final int p_length)
 ctor More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.builtin.IBuiltinAction
static final Logger LOGGER = CCommon.logger( IBuiltinAction.class )
 logger More...
 
- Static Protected Attributes inherited from org.lightjason.agentspeak.action.IBaseAction
static final Logger LOGGER = org.lightjason.agentspeak.common.CCommon.logger( IAction.class )
 logger More...
 

Detailed Description

Prints a set of messages to the commandline / output-stream, the command can be used with a variable set of arguments and fails never

generic/print("string A=", A, "-- B=", B, "-- C=", C, "-- D=", D, "-- X=", X, "-- Y=", Y);

Definition at line 57 of file CPrint.java.

Constructor & Destructor Documentation

◆ CPrint() [1/3]

org.lightjason.agentspeak.action.builtin.generic.CPrint.CPrint ( ) throws Exception
Exceptions
Exceptionis thrown on supplierer error
Note
generates an output stream to system.out

Definition at line 87 of file CPrint.java.

◆ CPrint() [2/3]

org.lightjason.agentspeak.action.builtin.generic.CPrint.CPrint ( @Nonnull final ISupplier< PrintStream >  p_streamsupplier) throws Exception
Parameters
p_streamsupplierprint stream supplier
Exceptions
Exceptionis thrown on supplierer error

Definition at line 98 of file CPrint.java.

◆ CPrint() [3/3]

org.lightjason.agentspeak.action.builtin.generic.CPrint.CPrint ( @Nonnull final ISupplier< PrintStream >  p_streamsupplier,
@Nonnull final String  p_seperator,
@Nullable final IFormatter<?>...  p_formatter 
) throws Exception
Parameters
p_streamsupplierprint stream supplier
p_seperatorargument seperator
p_formatterformatter elements
Exceptions
Exceptionis thrown on supplierer error

Definition at line 111 of file CPrint.java.

References org.lightjason.agentspeak.action.builtin.generic.CPrint.ISupplier< T >.get().

+ Here is the call graph for this function:

Member Function Documentation

◆ execute()

final IFuzzyValue<Boolean> org.lightjason.agentspeak.action.builtin.generic.CPrint.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 146 of file CPrint.java.

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

Referenced by org.lightjason.agentspeak.action.builtin.TestCActionGeneric.print(), and org.lightjason.agentspeak.action.builtin.TestCActionGeneric.printformatter().

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

◆ format()

String org.lightjason.agentspeak.action.builtin.generic.CPrint.format ( @Nonnull final Collection< ITerm p_argument)
private
Parameters
p_argumentarguments list
Returns
string

Definition at line 161 of file CPrint.java.

References org.lightjason.agentspeak.language.ITerm.raw(), and org.lightjason.agentspeak.action.builtin.generic.CPrint.IFormatter< T >.toString().

Referenced by org.lightjason.agentspeak.action.builtin.generic.CPrint.IFormatter< Boolean >.toString().

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

◆ formatter()

final Set<IFormatter<?> > org.lightjason.agentspeak.action.builtin.generic.CPrint.formatter ( )
Returns
formatter set

Definition at line 139 of file CPrint.java.

References org.lightjason.agentspeak.action.builtin.generic.CPrint.m_formatter.

Referenced by org.lightjason.agentspeak.action.builtin.TestCActionGeneric.printformatter().

+ Here is the caller graph for this function:

◆ readObject()

void org.lightjason.agentspeak.action.builtin.generic.CPrint.readObject ( final ObjectInputStream  p_stream) throws Exception
private
Parameters
p_streamobject stream
Exceptions
Exceptionis thrown on io error
Exceptionis thrown on deserialization error

Definition at line 128 of file CPrint.java.

References org.lightjason.agentspeak.action.builtin.generic.CPrint.ISupplier< T >.get().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_formatter

final Set<IFormatter<?> > org.lightjason.agentspeak.action.builtin.generic.CPrint.m_formatter
private

◆ m_seperator

final String org.lightjason.agentspeak.action.builtin.generic.CPrint.m_seperator
private

Definition at line 74 of file CPrint.java.

◆ m_stream

transient PrintStream org.lightjason.agentspeak.action.builtin.generic.CPrint.m_stream
private

Definition at line 66 of file CPrint.java.

◆ m_streamsupplier

final ISupplier<PrintStream> org.lightjason.agentspeak.action.builtin.generic.CPrint.m_streamsupplier
private

Definition at line 70 of file CPrint.java.

◆ serialVersionUID

final long org.lightjason.agentspeak.action.builtin.generic.CPrint.serialVersionUID = -4271829260928469828L
staticprivate

Definition at line 62 of file CPrint.java.