Clean up code.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / ctf / core / event / CTFClock.java
1 /*******************************************************************************
2 * Copyright (c) 2011-2012 Ericsson, Ecole Polytechnique de Montreal and others
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 * Contributors: Simon Marchi - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.ctf.core.event;
14
15 import java.util.HashMap;
16
17 /**
18 */
19 public class CTFClock {
20
21 /**
22 * Field properties.
23 */
24 final private HashMap<String, Object> properties = new HashMap<String, Object>();
25 /**
26 * Field name.
27 */
28 private String name;
29
30 /**
31 * Method addAttribute.
32 * @param key String
33 * @param value Object
34 */
35 public void addAttribute(String key, Object value) {
36 this.properties.put(key, value);
37 if (key.equals("name")) { //$NON-NLS-1$
38 this.name = (String) value;
39 }
40 }
41
42 /**
43 * Method getName.
44 * @return String
45 */
46 public String getName() {
47 return name;
48 }
49
50 /**
51 * Method getProperty.
52 * @param key String
53 * @return Object
54 */
55 public Object getProperty(String key) {
56 return properties.get(key);
57 }
58
59 }
This page took 0.038035 seconds and 6 git commands to generate.