Merge branch 'releases/Release_2_11_3_Branch'
[jalview.git] / src / jalview / datamodel / ContactRange.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.datamodel;
22
23 /**
24  * bean for max/min positions for a given range
25  * 
26  * @author jprocter
27  *
28  */
29 public class ContactRange
30 {
31   int minPos;
32
33   double min;
34
35   int maxPos;
36
37   double max;
38
39   int from_column, to_column;
40
41   private double mean;
42
43   /**
44    * update the bean with given values
45    * 
46    * @param from_column
47    * @param to_column
48    * @param minPos
49    * @param min
50    * @param maxPos
51    * @param max
52    */
53   public void update(int from_column, int to_column, int minPos, double min,
54           int maxPos, double max, double mean)
55   {
56     this.from_column = from_column;
57     this.to_column = to_column;
58     this.minPos = minPos;
59     this.min = min;
60     this.maxPos = maxPos;
61     this.max = max;
62     this.mean = mean;
63   }
64
65   /**
66    * @return the minPos
67    */
68   public int getMinPos()
69   {
70     return minPos;
71   }
72
73   /**
74    * @param minPos
75    *          the minPos to set
76    */
77   public void setMinPos(int minPos)
78   {
79     this.minPos = minPos;
80   }
81
82   /**
83    * @return the min
84    */
85   public double getMin()
86   {
87     return min;
88   }
89
90   /**
91    * @param min
92    *          the min to set
93    */
94   public void setMin(double min)
95   {
96     this.min = min;
97   }
98
99   /**
100    * @return the maxPos
101    */
102   public int getMaxPos()
103   {
104     return maxPos;
105   }
106
107   /**
108    * @param maxPos
109    *          the maxPos to set
110    */
111   public void setMaxPos(int maxPos)
112   {
113     this.maxPos = maxPos;
114   }
115
116   /**
117    * @return the max
118    */
119   public double getMax()
120   {
121     return max;
122   }
123
124   /**
125    * @param max
126    *          the max to set
127    */
128   public void setMax(double max)
129   {
130     this.max = max;
131   }
132
133   /**
134    * @return the mean
135    */
136   public double getMean()
137   {
138     return mean;
139   }
140
141   /**
142    * @param mean
143    *          the mean to set
144    */
145   public void setMean(double mean)
146   {
147     this.mean = mean;
148   }
149
150   /**
151    * @return the from_column
152    */
153   public int getFrom_column()
154   {
155     return from_column;
156   }
157
158   /**
159    * @param from_column
160    *          the from_column to set
161    */
162   public void setFrom_column(int from_column)
163   {
164     this.from_column = from_column;
165   }
166
167   /**
168    * @return the to_column
169    */
170   public int getTo_column()
171   {
172     return to_column;
173   }
174
175   /**
176    * @param to_column
177    *          the to_column to set
178    */
179   public void setTo_column(int to_column)
180   {
181     this.to_column = to_column;
182   }
183 }