60f26501e08540ad5f4ae85036486df28188e4bf
[sdc.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.sdc.tosca.datatypes.model.heatextend;
22
23 import java.util.Collections;
24 import java.util.HashMap;
25 import java.util.Map;
26
27 /**
28  * The enum Property type ext.
29  */
30 public enum PropertyTypeExt {
31
32     /**
33      * Json property type ext.
34      */
35     JSON("json");
36
37     private static final Map<String, PropertyTypeExt> M_MAP =
38             Collections.unmodifiableMap(initializeMapping());
39     private String displayName;
40
41     PropertyTypeExt(String displayName) {
42         this.displayName = displayName;
43     }
44
45     /**
46      * Initialize mapping map.
47      *
48      * @return the map
49      */
50     public static Map<String, PropertyTypeExt> initializeMapping() {
51         Map<String, PropertyTypeExt> typeMap = new HashMap<>();
52         for (PropertyTypeExt v : PropertyTypeExt.values()) {
53             typeMap.put(v.displayName, v);
54         }
55         return typeMap;
56     }
57
58     /**
59      * Gets display name.
60      *
61      * @return the display name
62      */
63     public String getDisplayName() {
64         return displayName;
65     }
66
67
68 }