24 package org.lightjason.agentspeak.language.instantiable.rule;
26 import com.google.common.collect.Multimap;
37 import javax.annotation.Nonnull;
38 import java.text.MessageFormat;
39 import java.util.List;
40 import java.util.stream.Stream;
97 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return
107 return Stream.empty();
113 return m_id.hashCode();
117 public final boolean equals(
final Object p_object )
119 return ( p_object instanceof
IRule ) && ( this.
hashCode() == p_object.hashCode() );
125 return MessageFormat.format(
final boolean equals(final Object p_object)
placeholder rule to define correct rule referencing
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
final ILiteral identifier()
returns the identifier of the rule
common structure for execution definition
interface of logical rule
final IRule replaceplaceholder( @Nonnull final Multimap< IPath, IRule > p_rules)
replaces all placeholder objects and reinstantiate object
execution context with local data
final ILiteral m_id
identifier of the rule
result for an immutable fuzzy value
static final long serialVersionUID
serial id
final IContext instantiate( @Nonnull final IAgent<?> p_agent, @Nonnull final Stream< IVariable<?>> p_variable)
creates an individual execution context
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
CRulePlaceholder(final ILiteral p_id)
ctor
final Stream< IVariable<?> > variables()
returns a stream with all used variables
static IContext instantiate( @Nonnull final IInstantiable p_instance, @Nonnull final IAgent<?> p_agent, @Nonnull final Stream< IVariable<?>> p_variable)
creates the instantiate execution context with default variables