Class AbstractDeviceStatistics

    • Constructor Detail

      • AbstractDeviceStatistics

        public AbstractDeviceStatistics()
    • Method Detail

      • getStatisticsByGrid

        public java.util.Optional<Statistics> getStatisticsByGrid​(int grid)
        Supply the Statistics gathered for a chosen grid
        Parameters:
        grid - grid
        Returns:
        Optional - avoid NPE if no statistics present
      • getStats

        public abstract java.util.List<Statistics> getStats()
        All classes implementing this abstract class need to provide a "getStats"-method
        Returns:
        List
      • getStats

        protected java.util.List<Statistics> getStats​(java.util.List<Statistics> stats,
                                                      MeasurementUnit measurementUnit)
        AVM gathers just integer numbers. We know the precision only from documentation, it is never provided by returned responses from Fritz!Box. So we add this information here to the statistics.
        Parameters:
        stats - statistics to which to add the measurment unit
        measurementUnit - the unit to add to the statistics
        Returns:
        statistics with measurement units
      • statisticsToString

        protected abstract java.util.List<java.lang.String> statisticsToString()
        All classes implementing this abstract class need to provide a "statisticsToString"-method
        Returns:
        List
      • statisticsToString

        protected java.util.List<java.lang.String> statisticsToString​(java.lang.String type)
        Parameters:
        type - statistics type
        Returns:
        statistics as one line per grid