-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in 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.g2d.connection;\r
-\r
-import org.simantics.g2d.diagram.handler.Topology.Terminal;\r
-import org.simantics.g2d.element.IElement;\r
-import org.simantics.utils.datastructures.Pair;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class TerminalReference {\r
-\r
- private final Pair<IElement, Terminal> data;\r
-\r
- public TerminalReference(IElement node, Terminal terminal) {\r
- data = Pair.make(node, terminal);\r
- }\r
-\r
- public Object getNode() {\r
- return data.first;\r
- }\r
-\r
- public Terminal getTerminal() {\r
- return data.second;\r
- }\r
-\r
- @Override\r
- public int hashCode() {\r
- return data.hashCode();\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (this == obj)\r
- return true;\r
- if (obj == null)\r
- return false;\r
- if (!(obj instanceof TerminalReference))\r
- return false;\r
- TerminalReference other = (TerminalReference) obj;\r
- return data.equals(other.data);\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- return getClass().getSimpleName() + "[" + data + "]";\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 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.g2d.connection;
+
+import org.simantics.g2d.diagram.handler.Topology.Terminal;
+import org.simantics.g2d.element.IElement;
+import org.simantics.utils.datastructures.Pair;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class TerminalReference {
+
+ private final Pair<IElement, Terminal> data;
+
+ public TerminalReference(IElement node, Terminal terminal) {
+ data = Pair.make(node, terminal);
+ }
+
+ public Object getNode() {
+ return data.first;
+ }
+
+ public Terminal getTerminal() {
+ return data.second;
+ }
+
+ @Override
+ public int hashCode() {
+ return data.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof TerminalReference))
+ return false;
+ TerminalReference other = (TerminalReference) obj;
+ return data.equals(other.data);
+ }
+
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + "[" + data + "]";
+ }
+
+}