1 /*
2 * Themis: Java Project Framework
3 * Copyright 2012-2026. Tony Washer
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy
7 * of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17 package io.github.tonywasher.joceanus.themis.lethe.analysis;
18
19 import io.github.tonywasher.joceanus.themis.lethe.analysis.ThemisAnalysisDataMap.ThemisAnalysisDataType;
20
21 /**
22 * Primitive.
23 */
24 public enum ThemisAnalysisPrimitive
25 implements ThemisAnalysisDataType {
26 /**
27 * byte.
28 */
29 BYTE("byte", "Byte"),
30
31 /**
32 * Char.
33 */
34 CHAR("char", "Character"),
35
36 /**
37 * Short.
38 */
39 SHORT("short", "Short"),
40
41 /**
42 * Int.
43 */
44 INT("int", "Integer"),
45
46 /**
47 * Long.
48 */
49 LONG("long", "Long"),
50
51 /**
52 * Boolean.
53 */
54 BOOLEAN("boolean", "Boolean"),
55
56 /**
57 * Float.
58 */
59 FLOAT("float", "Float"),
60
61 /**
62 * Double.
63 */
64 DOUBLE("double", "Double"),
65
66 /**
67 * Void.
68 */
69 VOID("void", "Void");
70
71 /**
72 * The primitive.
73 */
74 private final String thePrimitive;
75
76 /**
77 * The boxed.
78 */
79 private final String theBoxed;
80
81 /**
82 * Constructor.
83 *
84 * @param pPrimitive the primitive
85 * @param pBoxed the boxed
86 */
87 ThemisAnalysisPrimitive(final String pPrimitive,
88 final String pBoxed) {
89 thePrimitive = pPrimitive;
90 theBoxed = pBoxed;
91 }
92
93 /**
94 * Obtain the primitive.
95 *
96 * @return the primitive
97 */
98 String getPrimitive() {
99 return thePrimitive;
100 }
101
102 /**
103 * Obtain the boxed.
104 *
105 * @return the boxed
106 */
107 String getBoxed() {
108 return theBoxed;
109 }
110
111 @Override
112 public String toString() {
113 return getPrimitive();
114 }
115 }