1 |
/* |
2 |
* Header.java |
3 |
* Copyright(C) 2002 The Free Software Foundation |
4 |
* |
5 |
* This file is part of GNU JavaMail, a library. |
6 |
* |
7 |
* GNU JavaMail is free software; you can redistribute it and/or modify |
8 |
* it under the terms of the GNU General Public License as published by |
9 |
* the Free Software Foundation; either version 2 of the License, or |
10 |
*(at your option) any later version. |
11 |
* |
12 |
* GNU JavaMail is distributed in the hope that it will be useful, |
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
* GNU General Public License for more details. |
16 |
* |
17 |
* You should have received a copy of the GNU General Public License |
18 |
* along with this library; if not, write to the Free Software |
19 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
* |
21 |
* As a special exception, if you link this library with other files to |
22 |
* produce an executable, this library does not by itself cause the |
23 |
* resulting executable to be covered by the GNU General Public License. |
24 |
* This exception does not however invalidate any other reasons why the |
25 |
* executable file might be covered by the GNU General Public License. |
26 |
*/ |
27 |
|
28 |
package javax.mail; |
29 |
|
30 |
/** |
31 |
* The Header class stores a name/value pair to represent headers. |
32 |
* |
33 |
* @author <a href="mailto:dog@gnu.org">Chris Burdess</a> |
34 |
* @version 1.3 |
35 |
*/ |
36 |
public class Header |
37 |
{ |
38 |
|
39 |
/** |
40 |
* The name. |
41 |
*/ |
42 |
protected String name; |
43 |
|
44 |
/** |
45 |
* The value. |
46 |
*/ |
47 |
protected String value; |
48 |
|
49 |
/** |
50 |
* Construct a Header object. |
51 |
* @param name name of the header |
52 |
* @param value value of the header |
53 |
*/ |
54 |
public Header(String name, String value) |
55 |
{ |
56 |
this.name = name; |
57 |
this.value = value; |
58 |
} |
59 |
|
60 |
/** |
61 |
* Returns the name of this header. |
62 |
*/ |
63 |
public String getName() |
64 |
{ |
65 |
return name; |
66 |
} |
67 |
|
68 |
/** |
69 |
* Returns the value of this header. |
70 |
*/ |
71 |
public String getValue() |
72 |
{ |
73 |
return value; |
74 |
} |
75 |
|
76 |
} |