OSDN Git Service

e29e558b19241a41f84ac9d2f280755436d8715b
[neighbornote/NeighborNote.git] / src / cx / fbn / nevernote / utilities / Pair.java
1 /*\r
2  * This file is part of NixNote \r
3  * Copyright 2009 Randy Baumgarte\r
4  * \r
5  * This file may be licensed under the terms of of the\r
6  * GNU General Public License Version 2 (the ``GPL'').\r
7  *\r
8  * Software distributed under the License is distributed\r
9  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either\r
10  * express or implied. See the GPL for the specific language\r
11  * governing rights and limitations.\r
12  *\r
13  * You should have received a copy of the GPL along with this\r
14  * program. If not, go to http://www.gnu.org/licenses/gpl.html\r
15  * or write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
17  *\r
18 */\r
19 \r
20 package cx.fbn.nevernote.utilities;\r
21 \r
22 public class Pair<T, S>{\r
23 \r
24         private T first;\r
25         private S second;\r
26 \r
27         public Pair(T f, S s){ \r
28             first = f;\r
29             second = s;   \r
30           }\r
31         public Pair() {\r
32                 \r
33         }\r
34         public T getFirst(){\r
35            return first;\r
36         }\r
37          \r
38         public S getSecond()   {\r
39             return second;\r
40         }\r
41          \r
42         @Override\r
43         public String toString()  { \r
44           return "(" + first.toString() + ", " + second.toString() + ")"; \r
45         }\r
46 \r
47         public void setFirst(T t) {\r
48                 first = t;\r
49         }\r
50         public void setSecond(S s) {\r
51                 second = s;\r
52         }\r
53 }\r
54