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
.tmf
.core
.synchronization
;
15 import java
.io
.Serializable
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.timestamp
.ITmfTimestamp
;
20 * A default simple, identity timestamp transform. It is a singleton class and
21 * returns the timestamp itself
23 * @author Geneviève Bastien
26 public class TmfTimestampTransform
implements ITmfTimestampTransform
, Serializable
{
29 * Generated serial UID
31 private static final long serialVersionUID
= -1480581417493073304L;
34 * The unique instance of this transform, since it is always the same
36 public static final TmfTimestampTransform IDENTITY
= new TmfTimestampTransform();
41 protected TmfTimestampTransform() {
46 public ITmfTimestamp
transform(ITmfTimestamp timestamp
) {
51 public long transform(long timestamp
) {
56 public ITmfTimestampTransform
composeWith(ITmfTimestampTransform composeWith
) {
57 /* Since this transform will not modify anything, return the other */
62 public boolean equals(Object other
) {
63 return other
.getClass().equals(TmfTimestampTransform
.class);
67 public int hashCode() {
70 result
= (prime
* result
) + TmfTimestampTransform
.class.hashCode();
75 public String
toString() {
76 return "TmfTimestampTransform [ IDENTITY ]"; //$NON-NLS-1$