Class AbstractDoubleExporter

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

    
    public abstract class AbstractDoubleExporter
     implements Extractor<Double>
                        

    Double-formatting utility. Provided a precision representing the significant digits, formats doubles accordingly, using Locale.ENGLISH. If null is provided, returns the default conversion to string.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Integer getPrecision()
      final <T extends Any> Map<String, String> extractDataAsText(Environment<T, ?> environment, Actionable<T> reaction, Time time, Long step) Same as extractData, but specifically meant for textual outputs.
      • Methods inherited from class it.unibo.alchemist.boundary.Extractor

        extractData, getColumnNames
      • Methods inherited from class java.lang.Object

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

      • AbstractDoubleExporter

        AbstractDoubleExporter(Integer precision)
      • AbstractDoubleExporter

        AbstractDoubleExporter()
    • Method Detail

      • extractDataAsText

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

        Same as extractData, but specifically meant for textual outputs. Captures E to String conversions. The default implementation just runs a toString() conversion ver extractData's return value's values.

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

        the extracted properties in textual format with their names.