001    package ezvcard.parameters;
002    
003    
004    /*
005     Copyright (c) 2012, Michael Angstadt
006     All rights reserved.
007    
008     Redistribution and use in source and binary forms, with or without
009     modification, are permitted provided that the following conditions are met: 
010    
011     1. Redistributions of source code must retain the above copyright notice, this
012     list of conditions and the following disclaimer. 
013     2. Redistributions in binary form must reproduce the above copyright notice,
014     this list of conditions and the following disclaimer in the documentation
015     and/or other materials provided with the distribution. 
016    
017     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
018     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
019     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
020     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
021     ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
022     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
023     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
024     ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
025     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
026     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
027    
028     The views and conclusions contained in the software and documentation are those
029     of the authors and should not be interpreted as representing official policies, 
030     either expressed or implied, of the FreeBSD Project.
031     */
032    
033    /**
034     * Represents the TYPE parameter of the EMAIL type.
035     * <p>
036     * vCard versions: 2.1, 3.0, 4.0
037     * </p>
038     * @author Michael Angstadt
039     */
040    public class EmailTypeParameter extends TypeParameter {
041            /**
042             * vCard versions: 2.1, 3.0
043             */
044            public static final EmailTypeParameter INTERNET = new EmailTypeParameter("internet");
045    
046            /**
047             * vCard versions: 2.1, 3.0
048             */
049            public static final EmailTypeParameter X400 = new EmailTypeParameter("x400");
050    
051            /**
052             * vCard versions: 2.1, 3.0
053             */
054            public static final EmailTypeParameter PREF = new EmailTypeParameter("pref");
055    
056            /**
057             * vCard versions: 2.1 (suggested)
058             */
059            public static final EmailTypeParameter AOL = new EmailTypeParameter("aol");
060    
061            /**
062             * vCard versions: 2.1 (suggested)
063             */
064            public static final EmailTypeParameter APPLELINK = new EmailTypeParameter("applelink");
065    
066            /**
067             * vCard versions: 2.1 (suggested)
068             */
069            public static final EmailTypeParameter ATTMAIL = new EmailTypeParameter("attmail");
070    
071            /**
072             * vCard versions: 2.1 (suggested)
073             */
074            public static final EmailTypeParameter CIS = new EmailTypeParameter("cis");
075    
076            /**
077             * vCard versions: 2.1 (suggested)
078             */
079            public static final EmailTypeParameter EWORLD = new EmailTypeParameter("eworld");
080    
081            /**
082             * vCard versions: 2.1 (suggested)
083             */
084            public static final EmailTypeParameter IBMMAIL = new EmailTypeParameter("ibmmail");
085    
086            /**
087             * vCard versions: 2.1 (suggested)
088             */
089            public static final EmailTypeParameter MCIMAIL = new EmailTypeParameter("mcimail");
090    
091            /**
092             * vCard versions: 2.1 (suggested)
093             */
094            public static final EmailTypeParameter POWERSHARE = new EmailTypeParameter("powershare");
095    
096            /**
097             * vCard versions: 2.1 (suggested)
098             */
099            public static final EmailTypeParameter PRODIGY = new EmailTypeParameter("prodigy");
100    
101            /**
102             * vCard versions: 2.1 (suggested)
103             */
104            public static final EmailTypeParameter TLX = new EmailTypeParameter("tlx");
105    
106            /**
107             * vCard versions: 4.0
108             */
109            public static final EmailTypeParameter HOME = new EmailTypeParameter("home");
110    
111            /**
112             * vCard versions: 4.0
113             */
114            public static final EmailTypeParameter WORK = new EmailTypeParameter("work");
115    
116            /**
117             * Use of this constructor is discouraged and should only be used for
118             * defining non-standard TYPEs. Please use one of the predefined static
119             * objects.
120             * @param value the type value (e.g. "internet")
121             */
122            public EmailTypeParameter(String value) {
123                    super(value);
124            }
125    
126            /**
127             * Searches the static objects in this class for one that has a certain type
128             * value.
129             * @param value the type value to search for (e.g. "internet")
130             * @return the object or null if not found
131             */
132            public static EmailTypeParameter valueOf(String value) {
133                    return findByValue(value, EmailTypeParameter.class);
134            }
135    }