1 /*
2 * Copyright (C) 2019 sw4j.org
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.sw4j.tool.barcode.random.input;
18
19 import com.fasterxml.jackson.annotation.JsonCreator;
20 import com.fasterxml.jackson.annotation.JsonProperty;
21 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
22
23 /**
24 * <p>
25 * This class maps the input identifiers to Java objects.
26 * </p>
27 * <p>
28 * This class is immutable.
29 * </p>
30 * @author Uwe Plonus <u.plonus@gmail.com>
31 */
32 @JsonPropertyOrder({"ident", "code"})
33 public class Predefined {
34
35 /**
36 * <p>
37 * The identifier value itself.
38 * </p>
39 */
40 private final String ident;
41
42 /**
43 * <p>
44 * The code.
45 * </p>
46 */
47 private final String code;
48
49 /**
50 * <p>
51 * Create a new {@code Predefined} with the given {@code ident} and {@code code}.
52 * </p>
53 * @param ident the identifiers value.
54 * @param code the code.
55 */
56 @JsonCreator
57 public Predefined(@JsonProperty("ident") final String ident, @JsonProperty("code") final String code) {
58 this.ident = ident;
59 this.code = code;
60 }
61
62 /**
63 * <p>
64 * The identifiers value.
65 * </p>
66 * @return the value.
67 */
68 public String getIdent() {
69 return ident;
70 }
71
72 /**
73 * <p>
74 * The code.
75 * </p>
76 * @return the code.
77 */
78 public String getCode() {
79 return code;
80 }
81
82 }