From 5a6e7582a7978341f3a2de9a81cb63252bca0bb7 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 5 Aug 2016 14:41:53 +0500 Subject: - Moved GeneralReport to separate file - Removed unnecessary getOut function - Added methods sorting --- src/org/traccar/reports/model/GeneralReport.java | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/org/traccar/reports/model/GeneralReport.java (limited to 'src/org/traccar/reports/model') diff --git a/src/org/traccar/reports/model/GeneralReport.java b/src/org/traccar/reports/model/GeneralReport.java new file mode 100644 index 000000000..f60bb7238 --- /dev/null +++ b/src/org/traccar/reports/model/GeneralReport.java @@ -0,0 +1,42 @@ +package org.traccar.reports.model; + +public class GeneralReport { + + private String deviceName; + public String getDeviceName() { + return deviceName; + } + public void setDeviceName(String deviceName) { + this.deviceName = deviceName; + } + + private double distance = 0; + public double getDistance() { + return distance; + } + public void setDistance(double distance) { + this.distance = distance; + } + + public void addDistance(double distance) { + this.distance += distance; + } + + private double averageSpeed = 0; + public double getAverageSpeed() { + return averageSpeed; + } + public void setAverageSpeed(double averageSpeed) { + this.averageSpeed = averageSpeed; + } + + private double maxSpeed = 0; + public double getMaxSpeed() { + return maxSpeed; + } + public void setMaxSpeed(double maxSpeed) { + if (maxSpeed > this.maxSpeed) { + this.maxSpeed = maxSpeed; + } + } +} -- cgit v1.2.3