]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/content/OrderedPair.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / content / OrderedPair.java
index 3f506ca5a886550e2db6335debaa7b59828213cc..cfa2f07a51c13c8097bed8ac071bd9d5ade85f9f 100644 (file)
@@ -1,65 +1,65 @@
-/*******************************************************************************\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.diagram.content;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- *\r
- * @param <T> a comparable type\r
- */\r
-public class OrderedPair<T extends Comparable<T>> {\r
-\r
-    private final T first;\r
-    private final T second;\r
-\r
-    public OrderedPair(T first, T second) {\r
-        assert first != null;\r
-        assert second != null;\r
-\r
-        int comp = first.compareTo(second);\r
-        if (comp < 0) {\r
-            this.first = first;\r
-            this.second = second;\r
-        } else {\r
-            this.first = second;\r
-            this.second = first;\r
-        }\r
-    }\r
-\r
-    public T first() {\r
-        return first;\r
-    }\r
-\r
-    public T second() {\r
-        return second;\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return (first.hashCode() * 31) + second.hashCode();\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object obj) {\r
-        if (this == obj)\r
-            return true;\r
-        if (!(obj instanceof OrderedPair<?>))\r
-            return false;\r
-        OrderedPair<?> other = (OrderedPair<?>) obj;\r
-        return first.equals(other.first) && second.equals(other.second);\r
-    }\r
-\r
-    public static <T extends Comparable<T>> OrderedPair<T> make(T ra, T rb) {\r
-        return new OrderedPair<T>(ra, rb);\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.diagram.content;
+
+/**
+ * @author Tuukka Lehtonen
+ *
+ * @param <T> a comparable type
+ */
+public class OrderedPair<T extends Comparable<T>> {
+
+    private final T first;
+    private final T second;
+
+    public OrderedPair(T first, T second) {
+        assert first != null;
+        assert second != null;
+
+        int comp = first.compareTo(second);
+        if (comp < 0) {
+            this.first = first;
+            this.second = second;
+        } else {
+            this.first = second;
+            this.second = first;
+        }
+    }
+
+    public T first() {
+        return first;
+    }
+
+    public T second() {
+        return second;
+    }
+
+    @Override
+    public int hashCode() {
+        return (first.hashCode() * 31) + second.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (!(obj instanceof OrderedPair<?>))
+            return false;
+        OrderedPair<?> other = (OrderedPair<?>) obj;
+        return first.equals(other.first) && second.equals(other.second);
+    }
+
+    public static <T extends Comparable<T>> OrderedPair<T> make(T ra, T rb) {
+        return new OrderedPair<T>(ra, rb);
+    }
+
 }
\ No newline at end of file