24 package org.lightjason.agentspeak.action.builtin.collection.list;
26 import com.google.common.collect.ConcurrentHashMultiset;
27 import com.google.common.collect.Multiset;
36 import javax.annotation.Nonnegative;
37 import javax.annotation.Nonnull;
38 import java.util.Collections;
39 import java.util.Comparator;
40 import java.util.List;
41 import java.util.stream.Collectors;
79 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
82 final Multiset<Object> l_count = ConcurrentHashMultiset.create();
84 final List<Object> l_result = l_count.entrySet()
86 .filter( i -> i.getCount() % 2 == 1 )
87 .map( Multiset.Entry::getElement ).collect( Collectors.toList() );
88 l_result.sort( Comparator.comparing( Object::hashCode ) );
93 ? Collections.synchronizedList( l_result )
static final long serialVersionUID
serial id
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
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
creates the symmetric difference between lists (difference of union and intersection).
result for an immutable fuzzy value
< T > T raw()
cast to any raw value type
CSymmetricDifference()
ctor
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
term structure for simple datatypes