24 package org.lightjason.agentspeak.action.builtin.storage;
28 import javax.annotation.Nonnull;
29 import javax.annotation.Nullable;
30 import java.util.Arrays;
31 import java.util.Objects;
33 import java.util.concurrent.ConcurrentSkipListSet;
34 import java.util.function.Function;
35 import java.util.stream.Collectors;
36 import java.util.stream.Stream;
67 protected IStorage( @Nonnull
final Function<String, Boolean> p_resolver )
69 m_resolver = p_resolver;
77 protected IStorage( @Nullable
final String... p_forbidden )
80 ( Objects.isNull( p_forbidden ) ) || ( p_forbidden.length == 0 )
82 : Arrays.stream( p_forbidden )
91 protected IStorage( @Nonnull
final Stream<String> p_fordbidden )
93 final Set<String> l_names = p_fordbidden.collect( Collectors.toCollection( ConcurrentSkipListSet::new ) );
94 m_resolver = l_names::contains;
104 public final Stream<Boolean>
forbiddenkeys( @Nonnull
final Stream<String> p_keys )
106 return p_keys.map( m_resolver );
116 public final Stream<Boolean>
forbiddenkeys( @Nonnull
final String... p_keys )
base class of build-in actions for setting name by package/classname (without prefix character) ...
final Stream< Boolean > forbiddenkeys( @Nonnull final Stream< String > p_keys)
returns a stream which keys are forbidden
final Function< String, Boolean > m_resolver
set with forbidden keys
IStorage( @Nonnull final Function< String, Boolean > p_resolver)
ctor
final Stream< Boolean > forbiddenkeys( @Nonnull final String... p_keys)
returns a stream which keys are forbidden
IStorage( @Nullable final String... p_forbidden)
ctor
storage default definitions
IStorage( @Nonnull final Stream< String > p_fordbidden)
ctor
static final long serialVersionUID
serial id