Commit | Line | Data |
---|---|---|
a3fc8213 AM |
1 | package org.eclipse.linuxtools.tmf.core.ctfadaptor; |
2 | ||
3 | import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp; | |
4 | import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation; | |
5 | ||
6 | public class CtfLocation implements ITmfLocation<Long> { | |
7 | ||
57c073c5 MK |
8 | public static final Long INVALID_LOCATION = -1L; |
9 | ||
a3fc8213 AM |
10 | public CtfLocation(Long location) { |
11 | setLocation(location); | |
12 | } | |
ce2388e0 | 13 | |
a3fc8213 AM |
14 | public CtfLocation(ITmfTimestamp timestamp) { |
15 | setLocation(timestamp.getValue()); | |
16 | } | |
17 | ||
18 | private Long fTimestamp; | |
19 | ||
fcccd900 | 20 | // @Override |
a3fc8213 AM |
21 | public void setLocation(Long location) { |
22 | this.fTimestamp = location; | |
23 | } | |
24 | ||
25 | @Override | |
26 | public Long getLocation() { | |
27 | return this.fTimestamp; | |
28 | } | |
29 | ||
30 | @Override | |
31 | public CtfLocation clone() { | |
32 | return new CtfLocation(getLocation()); | |
33 | } | |
34 | ||
35 | } |