1 package baseCode.io.reader;
2
3 /***
4 * <hr>
5 * <p>
6 * Copyright (c) 2004 Columbia University
7 *
8 * @author pavlidis
9 * @version $Id: IndexScoreDyad.java,v 1.2 2004/08/17 21:17:41 pavlidis Exp $
10 */
11 final class IndexScoreDyad implements Comparable {
12
13 int key;
14 double value;
15
16 /***
17 * @param key
18 * @param value
19 */
20 public IndexScoreDyad( int key, double value ) {
21 this.key = key;
22 this.value = value;
23 }
24
25 /***
26 * @return Returns the key.
27 */
28 public int getKey() {
29 return key;
30 }
31
32 /***
33 * @return Returns the value.
34 */
35 public double getValue() {
36 return value;
37 }
38
39
40
41
42
43
44 public int compareTo( Object o ) {
45 IndexScoreDyad other = ( IndexScoreDyad ) o;
46 return other.getKey() - key;
47 }
48
49 }
50