24 package org.lightjason.agentspeak.action.builtin.datetime;
26 import com.codepoetics.protonpack.StreamUtils;
27 import org.joda.time.DateTime;
28 import org.joda.time.DateTimeZone;
29 import org.joda.time.Instant;
38 import javax.annotation.Nonnegative;
39 import javax.annotation.Nonnull;
40 import java.time.ZonedDateTime;
41 import java.util.List;
42 import java.util.TimeZone;
43 import java.util.stream.Stream;
73 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return
79 .map(
ITerm::<ZonedDateTime>raw )
80 .map( i ->
new DateTime( i.toInstant().toEpochMilli(), DateTimeZone.forTimeZone( TimeZone.getTimeZone( i.getZone() ) ) ) )
87 .forEach( p_return::add );
99 protected abstract Stream<?>
apply( @Nonnull
final Stream<List<Instant>> p_datetime );
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
base class of build-in actions for setting name by package/classname (without prefix character) ...
final int minimalArgumentNumber()
minimum number of arguments
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
abstract class to calculate difference between date-time elements
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
static final long serialVersionUID
serial id
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
abstract Stream<?> apply( @Nonnull final Stream< List< Instant >> p_datetime)
calculating method
term structure for simple datatypes