24 package org.lightjason.agentspeak.action.builtin.storage;
33 import javax.annotation.Nonnegative;
34 import javax.annotation.Nonnull;
35 import javax.annotation.Nullable;
36 import java.util.List;
37 import java.util.function.Function;
38 import java.util.stream.Stream;
68 public CExists( @Nonnull
final Function<String, Boolean> p_resolver )
78 public CExists( @Nullable
final String... p_forbidden )
88 public CExists( @Nonnull
final Stream<String> p_fordbidden )
90 super( p_fordbidden );
103 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return
107 .map(
ITerm::<String>raw )
108 .map( i -> ( !
m_resolver.apply( i ) ) && ( p_context.agent().storage().containsKey( i ) ) )
110 .forEach( p_return::add );
CExists( @Nonnull final Stream< String > p_fordbidden)
ctor
CExists( @Nonnull final Function< String, Boolean > p_resolver)
ctor
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
final Function< String, Boolean > m_resolver
set with forbidden keys
static final long serialVersionUID
serial id
execution context with local data
check if an element exists within the agent-storage.
static Stream< ITerm > flatten( @Nonnull final Collection<? extends ITerm > p_terms)
flat term-in-term collection into a straight term list
result for an immutable fuzzy value
storage default definitions
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
final int minimalArgumentNumber()
minimum number of arguments
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
CExists( @Nullable final String... p_forbidden)
ctor
term structure for simple datatypes