24 package org.lightjason.agentspeak.beliefbase.storage;
28 import javax.annotation.Nonnull;
29 import java.util.Collection;
30 import java.util.stream.Stream;
83 boolean putMultiElement( @Nonnull
final String p_key,
final N p_value );
Stream< N > streamMultiElements()
returns a stream over all multi-elements
boolean containsSingleElement( @Nonnull final String p_key)
contains a single-element
interface of a physical beliefbase storage
boolean putSingleElementIfAbsent( @Nonnull final String p_key, final M p_value)
puts a single-element if it is absent
Stream< M > streamSingleElements()
returns a stream over all single-elements
boolean putMultiElement( @Nonnull final String p_key, final N p_value)
puts a multi-element into the storage
boolean removeMultiElement( @Nonnull final String p_key, final N p_value)
removes a multi-element from the storage
Collection< N > getMultiElement( @Nonnull final String p_key)
returns a collection of multi-elementy by name
boolean empty()
checks if a storage is empty
boolean containsMultiElement( @Nonnull final String p_key)
contains a multi-element
M getSingleElementOrDefault( @Nonnull final String p_key, final M p_default)
returns a single-element by the name
IAgent<?> update( @Nonnull final IAgent<?> p_agent)
updates all items
void clear()
clears all elements
int size()
number of multi elements
M getSingleElement( @Nonnull final String p_key)
returns a single-element by the name
boolean putSingleElement( @Nonnull final String p_key, final M p_value)
puts a single-element into the storage
boolean removeSingleElement( @Nonnull final String p_key)
removes a single-element from the storage