1 42 43 package org.jfree.data.statistics; 44 45 import java.io.Serializable ; 46 import java.util.Collections ; 47 import java.util.List ; 48 49 import org.jfree.util.ObjectUtilities; 50 51 55 public class BoxAndWhiskerItem implements Serializable { 56 57 58 private static final long serialVersionUID = 7329649623148167423L; 59 60 61 private Number mean; 62 63 64 private Number median; 65 66 67 private Number q1; 68 69 70 private Number q3; 71 72 73 private Number minRegularValue; 74 75 76 private Number maxRegularValue; 77 78 79 private Number minOutlier; 80 81 82 private Number maxOutlier; 83 84 85 private List outliers; 86 87 102 public BoxAndWhiskerItem(Number mean, 103 Number median, 104 Number q1, 105 Number q3, 106 Number minRegularValue, 107 Number maxRegularValue, 108 Number minOutlier, 109 Number maxOutlier, 110 List outliers) { 111 112 this.mean = mean; 113 this.median = median; 114 this.q1 = q1; 115 this.q3 = q3; 116 this.minRegularValue = minRegularValue; 117 this.maxRegularValue = maxRegularValue; 118 this.minOutlier = minOutlier; 119 this.maxOutlier = maxOutlier; 120 this.outliers = outliers; 121 122 } 123 124 129 public Number getMean() { 130 return this.mean; 131 } 132 133 138 public Number getMedian() { 139 return this.median; 140 } 141 142 147 public Number getQ1() { 148 return this.q1; 149 } 150 151 156 public Number getQ3() { 157 return this.q3; 158 } 159 160 165 public Number getMinRegularValue() { 166 return this.minRegularValue; 167 } 168 169 174 public Number getMaxRegularValue() { 175 return this.maxRegularValue; 176 } 177 178 183 public Number getMinOutlier() { 184 return this.minOutlier; 185 } 186 187 192 public Number getMaxOutlier() { 193 return this.maxOutlier; 194 } 195 196 201 public List getOutliers() { 202 return Collections.unmodifiableList(this.outliers); 203 } 204 205 212 public boolean equals(Object obj) { 213 214 if (obj == this) { 215 return true; 216 } 217 if (!(obj instanceof BoxAndWhiskerItem)) { 218 return false; 219 } 220 BoxAndWhiskerItem that = (BoxAndWhiskerItem) obj; 221 if (!ObjectUtilities.equal(this.mean, that.mean)) { 222 return false; 223 } 224 if (!ObjectUtilities.equal(this.median, that.median)) { 225 return false; 226 } 227 if (!ObjectUtilities.equal(this.q1, that.q1)) { 228 return false; 229 } 230 if (!ObjectUtilities.equal(this.q3, that.q3)) { 231 return false; 232 } 233 if (!ObjectUtilities.equal( 234 this.minRegularValue, that.minRegularValue 235 )) { 236 return false; 237 } 238 if (!ObjectUtilities.equal( 239 this.maxRegularValue, that.maxRegularValue 240 )) { 241 return false; 242 } 243 if (!ObjectUtilities.equal(this.minOutlier, that.minOutlier)) { 244 return false; 245 } 246 if (!ObjectUtilities.equal(this.maxOutlier, that.maxOutlier)) { 247 return false; 248 } 249 if (!ObjectUtilities.equal(this.outliers, that.outliers)) { 250 return false; 251 } 252 return true; 253 } 254 255 } 256 | Popular Tags |