[go: up one dir, main page]

Menu

[r2]: / src / Stroke.java  Maximize  Restore  History

Download this file

36 lines (31 with data), 822 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Stroke.java
*
* Created on November 6, 2007, 12:25 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
/**
*
* @author ljbuesch
*/
public class Stroke implements Comparable {
public Integer stroke;
public Double score;
public Stroke(int stroke, double score) {
this.stroke=new Integer(stroke);
this.score=new Double(score);
}
public int compareTo(Object o) {
return score.compareTo((Double)o);
}
public boolean equals(Object o) {
if (o instanceof Stroke) {
if ( stroke.equals(((Stroke)o).stroke)){
return true;
}
}
return false;
}
}