1 43 44 package org.jfree.data.statistics; 45 46 import java.io.Serializable ; 47 48 import org.jfree.util.ObjectUtilities; 49 50 55 public class MeanAndStandardDeviation implements Serializable { 56 57 58 private static final long serialVersionUID = 7413468697315721515L; 59 60 61 private Number mean; 62 63 64 private Number standardDeviation; 65 66 72 public MeanAndStandardDeviation(double mean, double standardDeviation) { 73 this(new Double (mean), new Double (standardDeviation)); 74 } 75 76 83 public MeanAndStandardDeviation(Number mean, Number standardDeviation) { 84 this.mean = mean; 85 this.standardDeviation = standardDeviation; 86 } 87 88 93 public Number getMean() { 94 return this.mean; 95 } 96 97 102 public Number getStandardDeviation() { 103 return this.standardDeviation; 104 } 105 106 113 public boolean equals(Object obj) { 114 if (obj == this) { 115 return true; 116 } 117 if (!(obj instanceof MeanAndStandardDeviation)) { 118 return false; 119 } 120 MeanAndStandardDeviation that = (MeanAndStandardDeviation) obj; 121 if (!ObjectUtilities.equal(this.mean, that.mean)) { 122 return false; 123 } 124 if (!ObjectUtilities.equal( 125 this.standardDeviation, that.standardDeviation) 126 ) { 127 return false; 128 } 129 return true; 130 } 131 } 132 | Popular Tags |