1 /*******************************************************************************
2 * Copyright (c) 2013 École Polytechnique de Montréal
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
10 * Geneviève Bastien - Initial implementation and API
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.tmf
.core
.synchronization
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.synchronization
.ITmfTimestampTransform
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.ITmfTimestamp
;
19 * A default simple, identity timestamp transform. It is a singleton class and
20 * returns the timestamp itself
22 * @author Geneviève Bastien
24 public final class TmfTimestampTransform
implements ITmfTimestampTransformInvertible
{
27 * Generated serial UID
29 private static final long serialVersionUID
= -1480581417493073304L;
32 * The unique instance of this transform, since it is always the same
34 public static final TmfTimestampTransform IDENTITY
= new TmfTimestampTransform();
39 private TmfTimestampTransform() {
44 public ITmfTimestamp
transform(ITmfTimestamp timestamp
) {
49 public long transform(long timestamp
) {
54 public ITmfTimestampTransform
composeWith(ITmfTimestampTransform composeWith
) {
55 /* Since this transform will not modify anything, return the other */
60 public boolean equals(Object other
) {
61 return other
.getClass().equals(TmfTimestampTransform
.class);
65 public int hashCode() {
68 result
= (prime
* result
) + TmfTimestampTransform
.class.hashCode();
73 public String
toString() {
74 return "TmfTimestampTransform [ IDENTITY ]"; //$NON-NLS-1$
78 public ITmfTimestampTransform
inverse() {