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.Collections;
40 import java.util.List;
41 import java.util.stream.Collectors;
42 import java.util.stream.Stream;
65 public CRule( @Nonnull
final ILiteral p_id, @Nonnull
final List<IExecution> p_action )
69 Collections.emptySet(),
71 Stream.of( p_id.hashCode() ),
72 p_action.stream().map( Object::hashCode )
73 ).reduce( 0, ( i, j ) -> i ^ j )
87 @SuppressWarnings(
"unchecked" )
97 ).collect( Collectors.toList() )
115 return MessageFormat.format(
116 "{0} ({1} ==>> {2})",
CRule( @Nonnull final ILiteral p_id, @Nonnull final List< IExecution > p_action)
ctor
final Map< IAnnotation.EType, IAnnotation<?> > m_annotation
map with annotation (enum value for getting annotation object)
final Stream< IVariable<?> > variables()
returns a stream with all used variables
base structure of instantiable elements
placeholder rule to define correct rule referencing
internal execution interface
common structure for execution definition
Stream< ITerm > orderedvalues( @Nullable final IPath... p_path)
returns a stream over the ordered values in sequential ordering
interface of logical rule
final ILiteral identifier()
returns the identifier of the rule
final IRule replaceplaceholder( @Nonnull final Multimap< IPath, IRule > p_rules)
replaces all placeholder objects and reinstantiate object
static Stream< ITerm > flattenrecursive( @Nonnull final Stream< ITerm > p_input)
recursive stream of term values
final ILiteral m_id
identifier of the rule
final List< IExecution > m_action
action list
Stream< IVariable<?> > variables()
returns a stream of variables
default< T extends ITerm > T term()
casts the object to a term-type
achievement for rule-literal execution
static final long serialVersionUID
serial id
static< T > Stream< T > streamconcat( @Nonnull final Stream< T >... p_streams)
concat multiple streams