]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/impl/UniqueTerminalDataImpl.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / element / handler / impl / UniqueTerminalDataImpl.java
index b021e7030a674604e1b46edf93aa25c0cd087a40..32fdd961e4f7e4b10f1580cb410d60f66e537705 100644 (file)
@@ -1,57 +1,57 @@
-/*******************************************************************************\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.element.handler.impl;\r
-\r
-import java.util.Collection;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import org.simantics.g2d.diagram.handler.Topology.Terminal;\r
-import org.simantics.g2d.element.IElement;\r
-import org.simantics.g2d.element.handler.TerminalData;\r
-import org.simantics.utils.datastructures.hints.IHintContext.Key;\r
-\r
-/**\r
- * TerminalDataImpl that is used in ElementClass\r
- * \r
- * @author Marko Luukkainen <marko.luukkainen@vtt.fi>\r
- *\r
- */\r
-public class UniqueTerminalDataImpl implements TerminalData {\r
-\r
-    private static final long serialVersionUID = -2131030904280472077L;\r
-\r
-    private final Map<Terminal,Map<Key,Object>> terminals = new HashMap<Terminal, Map<Key,Object>>();\r
-\r
-    public UniqueTerminalDataImpl(Collection<? extends Terminal> terminals) {\r
-        for (Terminal t : terminals) {\r
-            this.terminals.put(t, new HashMap<Key, Object>(2));\r
-        }\r
-    }\r
-\r
-\r
-\r
-    @Override\r
-    public <T> T getHint(IElement e, Terminal t, Key key) {\r
-        Map<Key,Object> data = terminals.get(t);\r
-        if (data != null)\r
-            return (T)data.get(key);\r
-        return null;\r
-    }\r
-\r
-    @Override\r
-    public void setHint(IElement e, Terminal t, Key key, Object value) {\r
-        Map<Key,Object> data = terminals.get(t);\r
-        data.put(key, value);\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.element.handler.impl;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.simantics.g2d.diagram.handler.Topology.Terminal;
+import org.simantics.g2d.element.IElement;
+import org.simantics.g2d.element.handler.TerminalData;
+import org.simantics.utils.datastructures.hints.IHintContext.Key;
+
+/**
+ * TerminalDataImpl that is used in ElementClass
+ * 
+ * @author Marko Luukkainen <marko.luukkainen@vtt.fi>
+ *
+ */
+public class UniqueTerminalDataImpl implements TerminalData {
+
+    private static final long serialVersionUID = -2131030904280472077L;
+
+    private final Map<Terminal,Map<Key,Object>> terminals = new HashMap<Terminal, Map<Key,Object>>();
+
+    public UniqueTerminalDataImpl(Collection<? extends Terminal> terminals) {
+        for (Terminal t : terminals) {
+            this.terminals.put(t, new HashMap<Key, Object>(2));
+        }
+    }
+
+
+
+    @Override
+    public <T> T getHint(IElement e, Terminal t, Key key) {
+        Map<Key,Object> data = terminals.get(t);
+        if (data != null)
+            return (T)data.get(key);
+        return null;
+    }
+
+    @Override
+    public void setHint(IElement e, Terminal t, Key key, Object value) {
+        Map<Key,Object> data = terminals.get(t);
+        data.put(key, value);
+    }
+
+}