-/*******************************************************************************\r
- * Copyright (c) 2007, 2011 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.charts.ui;\r
-\r
-import org.simantics.databoard.util.ObjectUtils;\r
-\r
-/**\r
- * Shared time in the desktop environment when analysing data. \r
- *\r
- * @author toni.kalajainen@semantum.fi\r
- */\r
-public class ChartLinkData /*extends Bean*/ {\r
- \r
- // Actually is TimeSeriesEditor itself\r
- public transient Object sender;\r
- public double from, end, sx;\r
- public Double valueTipTime; \r
-\r
- public ChartLinkData() {}\r
- \r
- public ChartLinkData(Object sender, double from, double end, double sx) {\r
- this.sender = sender;\r
- this.from = from;\r
- this.end = end;\r
- this.sx = sx;\r
- } \r
- \r
- @Override\r
- public int hashCode() {\r
- long bits1 = Double.doubleToLongBits(from);\r
- long bits2 = Double.doubleToLongBits(end);\r
- long bits3 = Double.doubleToLongBits(sx);\r
- long bits4 = valueTipTime==null?0:Double.doubleToLongBits(valueTipTime);\r
- int hash = (int) (\r
- (bits1 ^ (bits1 >>> 32)) + \r
- (bits2 ^ (bits2 >>> 32)) +\r
- (bits3 ^ (bits3 >>> 32)) +\r
- (bits4 ^ (bits4 >>> 32)) );\r
- return hash;\r
- }\r
- \r
- @Override\r
- public boolean equals(Object obj) {\r
- if (obj ==null) return false;\r
- if (obj instanceof ChartLinkData==false) return false;\r
- ChartLinkData other = (ChartLinkData) obj;\r
- return from==other.from &&\r
- end==other.end &&\r
- sx==other.sx &&\r
- ObjectUtils.objectEquals(valueTipTime, other.valueTipTime);\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2011 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.charts.ui;
+
+import org.simantics.databoard.util.ObjectUtils;
+
+/**
+ * Shared time in the desktop environment when analysing data.
+ *
+ * @author toni.kalajainen@semantum.fi
+ */
+public class ChartLinkData /*extends Bean*/ {
+
+ // Actually is TimeSeriesEditor itself
+ public transient Object sender;
+ public double from, end, sx;
+ public Double valueTipTime;
+
+ public ChartLinkData() {}
+
+ public ChartLinkData(Object sender, double from, double end, double sx) {
+ this.sender = sender;
+ this.from = from;
+ this.end = end;
+ this.sx = sx;
+ }
+
+ @Override
+ public int hashCode() {
+ long bits1 = Double.doubleToLongBits(from);
+ long bits2 = Double.doubleToLongBits(end);
+ long bits3 = Double.doubleToLongBits(sx);
+ long bits4 = valueTipTime==null?0:Double.doubleToLongBits(valueTipTime);
+ int hash = (int) (
+ (bits1 ^ (bits1 >>> 32)) +
+ (bits2 ^ (bits2 >>> 32)) +
+ (bits3 ^ (bits3 >>> 32)) +
+ (bits4 ^ (bits4 >>> 32)) );
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj ==null) return false;
+ if (obj instanceof ChartLinkData==false) return false;
+ ChartLinkData other = (ChartLinkData) obj;
+ return from==other.from &&
+ end==other.end &&
+ sx==other.sx &&
+ ObjectUtils.objectEquals(valueTipTime, other.valueTipTime);
+ }
+
+}