Commit | Line | Data |
---|---|---|
866e5b51 FC |
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 | public class CTFClock { | |
18 | ||
19 | final private HashMap<String, Object> properties = new HashMap<String, Object>(); | |
20 | private String name; | |
21 | ||
22 | public void addAttribute(String key, Object value) { | |
23 | this.properties.put(key, value); | |
24 | if (key.equals("name")) { //$NON-NLS-1$ | |
25 | this.name = (String) value; | |
26 | } | |
27 | } | |
28 | ||
29 | public String getName() { | |
30 | return name; | |
31 | } | |
32 | ||
33 | public Object getProperty(String key) { | |
34 | return properties.get(key); | |
35 | } | |
36 | ||
37 | } |