View Javadoc

1   /*
2    *  
3    *  Fosstrak LLRP Commander (www.fosstrak.org)
4    * 
5    *  Copyright (C) 2008 ETH Zurich
6    *
7    *  This program is free software: you can redistribute it and/or modify
8    *  it under the terms of the GNU General Public License as published by
9    *  the Free Software Foundation, either version 3 of the License, or
10   *  (at your option) any later version.
11   *
12   *  This program is distributed in the hope that it will be useful,
13   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   *  GNU General Public License for more details.
16   *
17   *  You should have received a copy of the GNU General Public License
18   *  along with this program.  If not, see <http://www.gnu.org/licenses/> 
19   *
20   */
21  
22  package org.fosstrak.llrp.commander.editors;
23  
24  /**
25   * Single entry in Binary Viewer.
26   * 
27   * @author Haoning Zhang
28   * @version 1.0
29   */
30  public class BinarySingleValue {
31  	
32  	private String key, value, description;
33  	private BinaryMessage parent;
34  	
35  	/**
36  	 * Constructor, initialize with one BinaryMessage node
37  	 * as parent.
38  	 * 
39  	 * @param aParent Parent node of this entry
40  	 */
41  	public BinarySingleValue(BinaryMessage aParent) {
42  		parent = aParent;
43  	}
44  	
45  	/**
46  	 * Get the Parent node as one <code>BinaryMessage</code> instance.
47  	 * 
48  	 * @return Parent node
49  	 */
50  	public BinaryMessage getParent() {
51  		return parent;
52  	}
53  	
54  	/**
55  	 * Get the name of the Key
56  	 * 
57  	 * @return Name of the Key
58  	 */
59  	public String getKey() {
60  		return key;
61  	}
62  
63  	/**
64  	 * Set the key
65  	 * 
66  	 * @param aKey Name of the Key
67  	 */
68  	public void setKey(String aKey) {
69  		key = aKey;
70  	}
71  
72  	/**
73  	 * Get the value of the entry
74  	 * 
75  	 * @return Value of the entry
76  	 */
77  	public String getValue() {
78  		return value;
79  	}
80  
81  	/**
82  	 * Set the value of the entry
83  	 * 
84  	 * @param aValue Value of the entry
85  	 */
86  	public void setValue(String aValue) {
87  		value = aValue;
88  	}
89  	
90  	/**
91  	 * Get the description of the entry
92  	 * 
93  	 * @return Description of the entry
94  	 */
95  	public String getDescription() {
96  		return description;
97  	}
98  	
99  	/**
100 	 * Set the description of the entry
101 	 * 
102 	 * @param aDescription Description of the entry
103 	 */
104 	public void setDescription(String aDescription) {
105 		description = aDescription;
106 	}
107 }