24 package org.lightjason.agentspeak.agent;
    26 import com.google.common.collect.ImmutableMultimap;
    27 import com.google.common.collect.Multimap;
    42 import javax.annotation.Nonnegative;
    43 import javax.annotation.Nonnull;
    44 import javax.annotation.Nullable;
    45 import java.io.Serializable;
    46 import java.util.Arrays;
    47 import java.util.Collections;
    49 import java.util.concurrent.Callable;
    50 import java.util.stream.Stream;
    58 public interface IAgent<T 
extends IAgent<?>> extends Serializable, Callable<T>
    68         private static final long serialVersionUID = -3043602502559853983L;
    71         public final IAgent<?> call() 
throws Exception
    79         @SuppressWarnings( 
"varargs" )
    80         public final <N extends IInspector> Stream<N> 
inspect( @Nonnull 
final N... p_inspector )
    82             return Arrays.stream( p_inspector );
   103             return ImmutableMultimap.of();
   142         public final Map<String, Object> 
storage()
   144             return Collections.emptyMap();
   163         public final Multimap<ITrigger, IPlanStatistic> 
plans()
   165             return ImmutableMultimap.of();
   184         public final Multimap<IPath, IRule> 
rules()
   186             return ImmutableMultimap.of();
   191         @SuppressWarnings( 
"unchecked" )
   192         public final <N extends IAgent<?>> N 
raw()
   198         public final int hashCode()
   204         public final boolean equals( 
final Object p_object )
   206             return ( p_object instanceof 
IAgent<?> ) && ( this.hashCode() == p_object.hashCode() );
   218     @SuppressWarnings( 
"unchecked" )
   274     IAgent<T> sleep( 
final long p_cycles, @Nonnull 
final Stream<ITerm> p_term );
   326     Multimap<ITrigger, IPlanStatistic> 
plans();
   351     Multimap<IPath, IRule> 
rules();
 
IAgent< T > wakeup( @Nullable final ITerm... p_term)
wake-up the agent by generating wakeup-goal 
 
generator interface to create agents 
 
IUnifier EMPTY
empty unifier 
 
Multimap< ITrigger, IPlanStatistic > plans()
returns the internal map of plans 
 
IVariableBuilder variablebuilder()
returns the variable builder function 
 
IFuzzyBundle< Boolean > DEFAULTFUZZYBUNDLE
default fuzzy bundle 
 
long cycletime()
returns the time in nano seconds at the last cycle 
 
boolean sleeping()
returns sleeping state 
 
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory 
 
interface of logical rule 
 
Multimap< IPath, ILiteral > runningplans()
returns a map of the current running plans 
 
< N extends IAgent<?> N raw()
cast the interface agent object to a specified agent object 
 
Multimap< IPath, IRule > rules()
returns amultimap with literal-rule functor and rle objects 
 
interface of an unification algorithm 
 
view for a beliefbase that creates any access to the underlying data structures 
 
< N extends IInspector > Stream< N > inspect( @Nonnull final N... p_inspector)
inspector method 
 
result for an immutable fuzzy value 
 
Map< String, Object > storage()
storage access 
 
interface for a variable builder which is called on each plan / rule execution 
 
IAgent<?> EMPTY
empty agent 
 
IAgent< T > sleep(final long p_cycles, @Nullable final ITerm... p_term)
pushs the agent into sleeping state 
 
IFuzzyValue< Boolean > trigger( @Nonnull final ITrigger p_trigger, @Nullable final boolean... p_immediately)
trigger an event 
 
IView beliefbase()
returns the beliefbase 
 
IUnifier unifier()
returns an unifier 
 
IFuzzyBundle< Boolean > fuzzy()
return fuzzy operator 
 
inspector interface to read agent internal data 
 
IVariableBuilder EMPTY
empty variable builder