24 package org.lightjason.agentspeak.language.execution.action;
35 import javax.annotation.Nonnull;
36 import java.text.MessageFormat;
37 import java.util.List;
38 import java.util.Objects;
39 import java.util.stream.Collectors;
40 import java.util.stream.Stream;
67 m_righthand = p_righthand;
73 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
75 this.
set(
CCommon.replaceFromContext( p_context,
m_value ),
CCommon.replaceFromContext( p_context, m_righthand ).raw() );
82 return Objects.isNull(
m_value ) ? 0 :
m_value.hashCode() ^ m_righthand.hashCode();
86 public final boolean equals(
final Object p_object )
88 return ( p_object instanceof
IExecution ) && ( this.
hashCode() == p_object.hashCode() );
94 return MessageFormat.format(
"{0} =.. {1}",
m_value, m_righthand );
101 return Objects.isNull(
m_value ) ? Stream.empty() :
m_value.stream();
110 private void set( @Nonnull
final List<ITerm> p_assignment, @Nonnull
final ILiteral p_term )
112 if ( p_assignment.size() >= 1 )
114 if ( p_assignment.size() >= 2 )
115 p_assignment.get( 1 ).<
IVariable<Object>>term().
set( p_term.values().collect( Collectors.toList() ) );
IVariable< T > set( @Nullable final T p_value)
sets the value
internal execution interface
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
final boolean equals(final Object p_object)
common structure for execution definition
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)
execution context with local data
result for an immutable fuzzy value
CDeconstruct( @Nonnull final List< IVariable<?>> p_lefthand, @Nonnull final M p_righthand)
ctor
final Stream< IVariable<?> > variables()
class for any helper calls
final M m_righthand
right-hand argument (literal)
static final long serialVersionUID
serial id