[Bug304438] Improvement on ITmfLocation
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / trace / TmfLocation.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made 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:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.trace;
14
15 /**
16 * <b><u>TmfLocation</u></b>
17 * <p>
18 * A generic implementation of ITmfLocation
19 */
20 public class TmfLocation<L> implements ITmfLocation<L> {
21
22 private L fLocation;
23
24 public TmfLocation(L location) {
25 fLocation = location;
26 }
27
28 public void setLocation(L location) {
29 fLocation = location;
30 }
31
32 public L getLocation() {
33 return fLocation;
34 }
35
36 @Override
37 public String toString() {
38 return fLocation.toString();
39 }
40
41 @Override
42 @SuppressWarnings("unchecked")
43 public TmfLocation<L> clone() {
44 try {
45 return (TmfLocation<L>) super.clone();
46 } catch (CloneNotSupportedException e) {
47 e.printStackTrace();
48 }
49 return null;
50 }
51
52 }
This page took 0.031599 seconds and 5 git commands to generate.