24 package org.lightjason.agentspeak.action.builtin.collection.list;
26 import com.codepoetics.protonpack.StreamUtils;
35 import javax.annotation.Nonnegative;
36 import javax.annotation.Nonnull;
37 import java.util.AbstractMap;
38 import java.util.Collections;
39 import java.util.List;
40 import java.util.stream.Collectors;
77 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
80 if ( l_arguments.size() % 2 == 1 )
83 final List<AbstractMap.Entry<?, ?>> l_result = StreamUtils.zip(
84 l_arguments.stream().limit( l_arguments.size() / 2 ),
85 l_arguments.stream().skip( l_arguments.size() / 2 ),
86 AbstractMap.SimpleEntry::new
87 ).collect( Collectors.toList() );
91 p_parallel ? Collections.synchronizedList( l_result ) : l_result
base class of build-in actions for setting name by package/classname (without prefix character) ...
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
static final long serialVersionUID
serial id
execution context with local data
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
creates a list of tuples with elements of two lists.
< T > T raw()
cast to any raw value type
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
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
final int minimalArgumentNumber()
minimum number of arguments
term structure for simple datatypes