f8cc236c6f32efaf934067925c8d6bba30a9df6a
[vfc/nfvo/wfengine.git] /
1 /*******************************************************************************
2  * Copyright (c) 2013 University of Stuttgart.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and the Apache License 2.0 which both accompany this distribution,
6  * and are available at http://www.eclipse.org/legal/epl-v10.html
7  * and http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Contributors:
10  *     Oliver Kopp - initial API and implementation
11  *******************************************************************************/
12 package org.eclipse.winery.common.propertydefinitionkv;
13
14 import javax.xml.bind.annotation.XmlRootElement;
15
16 @XmlRootElement(name = "PropertyDefinition")
17 public class PropertyDefinitionKV {
18         
19         private String key;
20         private String type;
21         
22         
23         public PropertyDefinitionKV() {
24                 super();
25         }
26         
27         public PropertyDefinitionKV(String key, String type) {
28                 super();
29                 this.setKey(key);
30                 this.setType(type);
31         }
32         
33         public String getKey() {
34                 return this.key;
35         }
36         
37         public void setKey(String key) {
38                 if (key == null) {
39                         throw new IllegalArgumentException();
40                 }
41                 this.key = key;
42         }
43         
44         public String getType() {
45                 return this.type;
46         }
47         
48         public void setType(String type) {
49                 if (type == null) {
50                         throw new IllegalArgumentException();
51                 }
52                 this.type = type;
53         }
54         
55         @Override
56         public int hashCode() {
57                 return this.key.hashCode();
58         }
59 }