24 package org.lightjason.agentspeak.language.execution.action;
35 import javax.annotation.Nonnull;
36 import javax.annotation.Nullable;
37 import java.util.LinkedList;
38 import java.util.List;
39 import java.util.Objects;
40 import java.util.stream.Stream;
66 @SuppressWarnings(
"unchecked" )
70 return Stream.of( (IVariable<?>)
m_value );
73 return ( (IExpression) m_value ).variables();
75 return super.variables();
85 public final boolean equals(
final Object p_object )
98 @SuppressWarnings(
"unchecked" )
100 @Nonnull final List<
ITerm> p_argument, @Nonnull final List<
ITerm> p_return )
102 if (
m_value instanceof Boolean )
105 return this.
getTypedResult( (IVariable<?>) m_value, p_context, p_return );
107 return this.
getTypedResult( (IExpression) m_value, p_context, p_parallel, p_argument, p_return );
136 @Nonnull
final List<ITerm> p_return )
140 if ( !l_value.allocated() )
143 if ( l_value.valueassignableto( Boolean.class ) )
163 @Nonnull
final Boolean p_parallel, @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return
166 final List<ITerm> l_return =
new LinkedList<>();
167 if ( ( !p_execution.execute( p_parallel, p_context, p_argument, l_return ).value() ) || ( l_return.isEmpty() ) )
CRawAction( @Nullable final T p_data)
ctor
final Stream< IVariable<?> > variables()
returns a stream with all used variables
IFuzzyValue< Boolean > getTypedResult( @Nullable final T p_execution, @Nonnull final List< ITerm > p_return)
fixed type result
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
IFuzzyValue< Boolean > getTypedResult( @Nonnull final Boolean p_execution, @Nonnull final List< ITerm > p_return)
fixed type result
common structure for execution definition
encapsulate class for any non-executable data type e.g.
IFuzzyValue< Boolean > getTypedResult( @Nonnull final IVariable<?> p_execution, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_return)
fixed type result
execution context with local data
IFuzzyValue< Boolean > getTypedResult( @Nonnull final IExpression p_execution, @Nonnull final IContext p_context, @Nonnull final Boolean p_parallel, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
fixed type result
result for an immutable fuzzy value
final boolean equals(final Object p_object)
static final long serialVersionUID
serial id
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
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
class for any helper calls
term structure for simple datatypes