103 |
01 Jun 06 |
enell |
1 |
/* |
103 |
01 Jun 06 |
enell |
$Id$ |
103 |
01 Jun 06 |
enell |
3 |
|
103 |
01 Jun 06 |
enell |
Copyright (C) 2006 Johan Enell |
103 |
01 Jun 06 |
enell |
5 |
|
103 |
01 Jun 06 |
enell |
This file is part of BASE - BioArray Software Environment. |
103 |
01 Jun 06 |
enell |
Available at http://base.thep.lu.se/ |
103 |
01 Jun 06 |
enell |
8 |
|
103 |
01 Jun 06 |
enell |
BASE is free software; you can redistribute it and/or modify it |
103 |
01 Jun 06 |
enell |
under the terms of the GNU General Public License as published by |
103 |
01 Jun 06 |
enell |
the Free Software Foundation; either version 2 of the License, or |
103 |
01 Jun 06 |
enell |
(at your option) any later version. |
103 |
01 Jun 06 |
enell |
13 |
|
103 |
01 Jun 06 |
enell |
BASE is distributed in the hope that it will be useful, but |
103 |
01 Jun 06 |
enell |
WITHOUT ANY WARRANTY; without even the implied warranty of |
103 |
01 Jun 06 |
enell |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
103 |
01 Jun 06 |
enell |
General Public License for more details. |
103 |
01 Jun 06 |
enell |
18 |
|
103 |
01 Jun 06 |
enell |
You should have received a copy of the GNU General Public License |
103 |
01 Jun 06 |
enell |
along with this program; if not, write to the Free Software |
103 |
01 Jun 06 |
enell |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
103 |
01 Jun 06 |
enell |
02111-1307, USA. |
103 |
01 Jun 06 |
enell |
23 |
*/ |
103 |
01 Jun 06 |
enell |
24 |
package medianratio; |
103 |
01 Jun 06 |
enell |
25 |
|
103 |
01 Jun 06 |
enell |
26 |
public class Spot |
103 |
01 Jun 06 |
enell |
27 |
{ |
103 |
01 Jun 06 |
enell |
28 |
|
103 |
01 Jun 06 |
enell |
29 |
private float int1; |
103 |
01 Jun 06 |
enell |
30 |
|
103 |
01 Jun 06 |
enell |
31 |
private float int2; |
103 |
01 Jun 06 |
enell |
32 |
|
103 |
01 Jun 06 |
enell |
33 |
private final int block; |
103 |
01 Jun 06 |
enell |
34 |
|
103 |
01 Jun 06 |
enell |
35 |
public Spot(float int1, float int2) |
103 |
01 Jun 06 |
enell |
36 |
{ |
103 |
01 Jun 06 |
enell |
37 |
this.int1 = int1; |
103 |
01 Jun 06 |
enell |
38 |
this.int2 = int2; |
103 |
01 Jun 06 |
enell |
39 |
this.block = -1; |
103 |
01 Jun 06 |
enell |
40 |
} |
103 |
01 Jun 06 |
enell |
41 |
|
103 |
01 Jun 06 |
enell |
42 |
public Spot(float int1, float int2, int block) |
103 |
01 Jun 06 |
enell |
43 |
{ |
103 |
01 Jun 06 |
enell |
44 |
this.int1 = int1; |
103 |
01 Jun 06 |
enell |
45 |
this.int2 = int2; |
103 |
01 Jun 06 |
enell |
46 |
this.block = block; |
103 |
01 Jun 06 |
enell |
47 |
} |
103 |
01 Jun 06 |
enell |
48 |
|
103 |
01 Jun 06 |
enell |
49 |
public final int getBlock() |
103 |
01 Jun 06 |
enell |
50 |
{ |
103 |
01 Jun 06 |
enell |
51 |
return block; |
103 |
01 Jun 06 |
enell |
52 |
} |
103 |
01 Jun 06 |
enell |
53 |
|
103 |
01 Jun 06 |
enell |
54 |
public final float getInt1() |
103 |
01 Jun 06 |
enell |
55 |
{ |
103 |
01 Jun 06 |
enell |
56 |
return int1; |
103 |
01 Jun 06 |
enell |
57 |
} |
103 |
01 Jun 06 |
enell |
58 |
|
103 |
01 Jun 06 |
enell |
59 |
public final float getInt2() |
103 |
01 Jun 06 |
enell |
60 |
{ |
103 |
01 Jun 06 |
enell |
61 |
return int2; |
103 |
01 Jun 06 |
enell |
62 |
} |
103 |
01 Jun 06 |
enell |
63 |
|
103 |
01 Jun 06 |
enell |
64 |
public float getRatio() |
103 |
01 Jun 06 |
enell |
65 |
{ |
103 |
01 Jun 06 |
enell |
66 |
return int1 / int2; |
103 |
01 Jun 06 |
enell |
67 |
} |
103 |
01 Jun 06 |
enell |
68 |
|
103 |
01 Jun 06 |
enell |
69 |
public void setInt1(float f) |
103 |
01 Jun 06 |
enell |
70 |
{ |
103 |
01 Jun 06 |
enell |
71 |
this.int1 = f; |
103 |
01 Jun 06 |
enell |
72 |
} |
103 |
01 Jun 06 |
enell |
73 |
|
103 |
01 Jun 06 |
enell |
74 |
public void setInt2(float f) |
103 |
01 Jun 06 |
enell |
75 |
{ |
103 |
01 Jun 06 |
enell |
76 |
this.int2 = f; |
103 |
01 Jun 06 |
enell |
77 |
} |
103 |
01 Jun 06 |
enell |
78 |
|
103 |
01 Jun 06 |
enell |
79 |
@Override |
103 |
01 Jun 06 |
enell |
80 |
public String toString() |
103 |
01 Jun 06 |
enell |
81 |
{ |
103 |
01 Jun 06 |
enell |
82 |
return getInt1() + "\t" + getInt2(); |
103 |
01 Jun 06 |
enell |
83 |
} |
103 |
01 Jun 06 |
enell |
84 |
} |