Remove all existing @since annotations
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / trace / location / TmfTimestampLocation.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 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.tracecompass.tmf.core.trace.location;
14
15 import java.nio.ByteBuffer;
16
17 import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
18 import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
19
20 /**
21 * A concrete implementation of TmfLocation based on ITmfTimestamp:s
22 *
23 * @author Francois Chouinard
24 */
25 public final class TmfTimestampLocation extends TmfLocation {
26
27 /**
28 * The normal constructor
29 *
30 * @param locationInfo the concrete location
31 */
32 public TmfTimestampLocation(final ITmfTimestamp locationInfo) {
33 super(locationInfo);
34 }
35
36 /**
37 * The copy constructor
38 *
39 * @param other the other location
40 */
41 public TmfTimestampLocation(final TmfTimestampLocation other) {
42 super(other.getLocationInfo());
43 }
44
45 /**
46 * Construct the location from the ByteBuffer.
47 *
48 * @param bufferIn
49 * the buffer to read from
50 */
51 public TmfTimestampLocation(ByteBuffer bufferIn) {
52 super(new TmfTimestamp(bufferIn));
53 }
54
55 @Override
56 public ITmfTimestamp getLocationInfo() {
57 return (ITmfTimestamp) super.getLocationInfo();
58 }
59
60 @Override
61 public void serialize(ByteBuffer bufferOut) {
62 TmfTimestamp t = new TmfTimestamp(getLocationInfo());
63 t.serialize(bufferOut);
64 }
65 }
This page took 0.035004 seconds and 5 git commands to generate.