summaryrefslogtreecommitdiff
path: root/src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java')
-rw-r--r--src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java117
1 files changed, 117 insertions, 0 deletions
diff --git a/src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java b/src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java
new file mode 100644
index 0000000..7232174
--- /dev/null
+++ b/src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java
@@ -0,0 +1,117 @@
+package com.stileeducation.markr.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.util.Objects;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AggregateResponseDTO {
+
+ private double mean;
+ private double stddev;
+ private double min;
+ private double max;
+ private double p25;
+ private double p50;
+ private double p75;
+ private int count;
+
+ // Getters and Setters
+ public double getMean() {
+ return mean;
+ }
+
+ public void setMean(double mean) {
+ this.mean = mean;
+ }
+
+ public double getStddev() {
+ return stddev;
+ }
+
+ public void setStddev(double stddev) {
+ this.stddev = stddev;
+ }
+
+ public double getMin() {
+ return min;
+ }
+
+ public void setMin(double min) {
+ this.min = min;
+ }
+
+ public double getMax() {
+ return max;
+ }
+
+ public void setMax(double max) {
+ this.max = max;
+ }
+
+ public double getP25() {
+ return p25;
+ }
+
+ public void setP25(double p25) {
+ this.p25 = p25;
+ }
+
+ public double getP50() {
+ return p50;
+ }
+
+ public void setP50(double p50) {
+ this.p50 = p50;
+ }
+
+ public double getP75() {
+ return p75;
+ }
+
+ public void setP75(double p75) {
+ this.p75 = p75;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public void setCount(int count) {
+ this.count = count;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ AggregateResponseDTO that = (AggregateResponseDTO) o;
+ return Double.compare(mean, that.mean) == 0
+ && Double.compare(stddev, that.stddev) == 0
+ && Double.compare(min, that.min) == 0
+ && Double.compare(max, that.max) == 0
+ && Double.compare(p25, that.p25) == 0
+ && Double.compare(p50, that.p50) == 0
+ && Double.compare(p75, that.p75) == 0
+ && count == that.count;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(mean, stddev, min, max, p25, p50, p75, count);
+ }
+
+ @Override
+ public String toString() {
+ return "AggregatedTestResultsDTO{" +
+ "mean=" + mean +
+ ", stddev=" + stddev +
+ ", min=" + min +
+ ", max=" + max +
+ ", p25=" + p25 +
+ ", p50=" + p50 +
+ ", p75=" + p75 +
+ ", count=" + count +
+ '}';
+ }
+}