]> git.mxchange.org Git - jcontacts-core.git/blob - src/org/mxchange/jcontacts/model/contact/gender/Gender.java
Continued:
[jcontacts-core.git] / src / org / mxchange / jcontacts / model / contact / gender / Gender.java
1 /*
2  * Copyright (C) 2016 - 2018 Free Software Foundation
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcontacts.model.contact.gender;
18
19 import java.io.Serializable;
20
21 /**
22  * An enumeration for genders, sure more need to be added here. If you need
23  * titles instead, please use the proper enumeration then.
24  * <p>
25  * @author Roland Häder<roland@mxchange.org>
26  */
27 public enum Gender implements Serializable {
28
29         /**
30          * Male gender
31          */
32         MALE('M', "GENDER_MALE"), //NOI18N
33
34         /**
35          * Female gender
36          */
37         FEMALE('F', "GENDER_FEMALE"); //NOI18N
38
39         /**
40          * Access key being entered by ConsoleClient
41          */
42         private final char accessChar;
43
44         /**
45          * Output value (for messages)
46          */
47         private final String messageKey;
48
49         /**
50          * Constructor
51          * <p>
52          * @param accessChar Value being entered by ConsoleClient
53          * @param messageKey Message key for resource file
54          */
55         private Gender (final char accessChar, final String messageKey) {
56                 // Set both
57                 this.accessChar = accessChar;
58                 this.messageKey = messageKey;
59         }
60
61         /**
62          * Access key (console client mostly)
63          * <p>
64          * @return the accessChar
65          */
66         public char getAccessChar () {
67                 return this.accessChar;
68         }
69
70         /**
71          * Output value (for messages)
72          * <p>
73          * @return the messageKey
74          */
75         public String getMessageKey () {
76                 return this.messageKey;
77         }
78
79 }