1 package compbio.data.sequence;
\r
3 import java.util.Arrays;
\r
4 import java.util.List;
\r
6 import javax.xml.bind.annotation.XmlAccessType;
\r
7 import javax.xml.bind.annotation.XmlAccessorType;
\r
9 import compbio.conservation.Method;
\r
10 import compbio.util.annotation.Immutable;
\r
12 @XmlAccessorType(XmlAccessType.FIELD)
\r
14 public class Score {
\r
16 private Method method;
\r
18 private List<Float> scores;
\r
21 // JaXB default constructor
\r
24 public Score(Method method, List<Float> scores) {
\r
25 this.method = method;
\r
26 this.scores = scores;
\r
29 public Method getMethod() {
\r
33 public List<Float> getScores() {
\r
38 public String toString() {
\r
39 return "Score [method=" + method + ", scores=" + scores + "]";
\r
43 public int hashCode() {
\r
44 final int prime = 31;
\r
46 result = prime * result + ((method == null) ? 0 : method.hashCode());
\r
47 result = prime * result + ((scores == null) ? 0 : scores.hashCode());
\r
52 * TODO test ! (non-Javadoc)
\r
54 * @see java.lang.Object#equals(java.lang.Object)
\r
57 public boolean equals(Object obj) {
\r
62 if (getClass() != obj.getClass())
\r
64 Score other = (Score) obj;
\r
65 if (method != other.method)
\r
67 if (scores == other.scores) {
\r
70 if (scores == null) {
\r
73 if (!Arrays.deepEquals(scores.toArray(), other.scores.toArray()))
\r