generated from marchdev-tk/flutter_package_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganized collectors hierarchy, implemented skeleton of traffic con…
…sumption collector
- Loading branch information
Showing
7 changed files
with
58 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 14 additions & 8 deletions
22
lib/src/collectors/implementations/traffic_consumption.collector.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
import '../../models.dart'; | ||
import '../collector.dart'; | ||
|
||
class AnalysisTrafficConsumptionCollector implements AnalysisCollector<int> { | ||
const AnalysisTrafficConsumptionCollector(); | ||
abstract class TrafficConsumptionCollectorInterface | ||
implements AnalysisOnDemandCollectorInterface<num, dynamic> {} | ||
|
||
class TrafficConsumptionCollector | ||
implements TrafficConsumptionCollectorInterface { | ||
TrafficConsumptionCollector(); | ||
|
||
final Map<DateTime, num> _data = {}; | ||
|
||
@override | ||
void collect(int data) { | ||
// TODO | ||
} | ||
Map<DateTime, num> get data => Map.unmodifiable(_data); | ||
|
||
@override | ||
void clearData() => _data.clear(); | ||
|
||
@override | ||
Extremum<int> getExtremum() { | ||
// TODO: implement getExtremum | ||
Future<num> collect(dynamic value) async { | ||
// TODO: implement collect | ||
throw UnimplementedError(); | ||
} | ||
} |