Class Time

  • All Implemented Interfaces:
    it.unibo.alchemist.boundary.Extractor

    
    public final class Time
    extends AbstractDoubleExporter
                        

    Exports a column with the current time.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Time(Integer precision)
      Time()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<String> getColumnNames()
      <T extends Any> Map<String, Double> extractData(Environment<T, ?> environment, Actionable<T> reaction, Time time, Long step) Extracts properties from an environment.
      • Methods inherited from class it.unibo.alchemist.boundary.extractors.AbstractDoubleExporter

        extractDataAsText, getPrecision
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Time

        Time()
    • Method Detail

      • extractData

         <T extends Any> Map<String, Double> extractData(Environment<T, ?> environment, Actionable<T> reaction, Time time, Long step)

        Extracts properties from an environment. The returned map must either:

        • contain a single element,

        • have the keys matching columnNames, or

        • be iterable in predictable order (namely, implement SortedMap or extend one of LinkedHashMap or ConcurrentLinkedHashMap).

        Parameters:
        environment -
        the {@link Environment}
        reaction -
        the last executed {@link Reaction}
        time -
        the current {@link Time}
        step -
        the simulation step
        Returns:

        the extracted properties with their names. The returned map must either: - contain a single element, - have the keys matching columnNames, or - be iterable in predictable order (namely, implement SortedMap or extend LinkedHashMap).