001    /**
002     *
003     * Copyright 2003-2004 The Apache Software Foundation
004     *
005     *  Licensed under the Apache License, Version 2.0 (the "License");
006     *  you may not use this file except in compliance with the License.
007     *  You may obtain a copy of the License at
008     *
009     *     http://www.apache.org/licenses/LICENSE-2.0
010     *
011     *  Unless required by applicable law or agreed to in writing, software
012     *  distributed under the License is distributed on an "AS IS" BASIS,
013     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     *  See the License for the specific language governing permissions and
015     *  limitations under the License.
016     */
017    
018    package javax.mail;
019    
020    /**
021     * Class representing a header field.
022     *
023     * @version $Rev: 125724 $ $Date: 2005-01-19 22:11:12 -0800 (Wed, 19 Jan 2005) $
024     */
025    public class Header {
026        private final String name;
027        private final String value;
028    
029        /**
030         * Constructor initializing all immutable fields.
031         *
032         * @param name  the name of this header
033         * @param value the value of this header
034         */
035        public Header(String name, String value) {
036            this.name = name;
037            this.value = value;
038        }
039    
040        /**
041         * Return the name of this header.
042         *
043         * @return the name of this header
044         */
045        public String getName() {
046            return name;
047        }
048    
049        /**
050         * Return the value of this header.
051         *
052         * @return the value of this header
053         */
054        public String getValue() {
055            return value;
056        }
057    }