summaryrefslogtreecommitdiff
path: root/src/main/java/com/stileeducation/markr/dto/AggregateResponseDTO.java
blob: 723217474bdfab2c8ca0ec5a2c91def915ec0fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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 +
        '}';
  }
}