Last change
on this file was 1, checked in by Wouter Pasman, 7 years ago |
Initial import : Genius 9.0.0
|
File size:
965 bytes
|
Line | |
---|
1 | package genius.core.tournament.VariablesAndValues;
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * @author tim
|
---|
5 | * Used for varying values in experiments.
|
---|
6 | */
|
---|
7 | public class ExperimentalValue extends TournamentValue
|
---|
8 | {
|
---|
9 | private static final long serialVersionUID = -7690627644862645404L;
|
---|
10 | double value;
|
---|
11 |
|
---|
12 | public ExperimentalValue(double val) { value=val; }
|
---|
13 | public String toString() { return value+""; }
|
---|
14 | public double getValue(){ return value; }
|
---|
15 | @Override
|
---|
16 | public int hashCode() {
|
---|
17 | final int prime = 31;
|
---|
18 | int result = 1;
|
---|
19 | long temp;
|
---|
20 | temp = Double.doubleToLongBits(value);
|
---|
21 | result = prime * result + (int) (temp ^ (temp >>> 32));
|
---|
22 | return result;
|
---|
23 | }
|
---|
24 |
|
---|
25 | @Override
|
---|
26 | public boolean equals(Object obj) {
|
---|
27 | if (this == obj)
|
---|
28 | return true;
|
---|
29 | if (obj == null)
|
---|
30 | return false;
|
---|
31 | if (getClass() != obj.getClass())
|
---|
32 | return false;
|
---|
33 | ExperimentalValue other = (ExperimentalValue) obj;
|
---|
34 | if (Double.doubleToLongBits(value) != Double
|
---|
35 | .doubleToLongBits(other.value))
|
---|
36 | return false;
|
---|
37 | return true;
|
---|
38 | }
|
---|
39 |
|
---|
40 |
|
---|
41 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.