]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.issues/src/org/simantics/issues/Severity.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.issues / src / org / simantics / issues / Severity.java
diff --git a/bundles/org.simantics.issues/src/org/simantics/issues/Severity.java b/bundles/org.simantics.issues/src/org/simantics/issues/Severity.java
new file mode 100644 (file)
index 0000000..a28c6a5
--- /dev/null
@@ -0,0 +1,16 @@
+package org.simantics.issues;\r
+\r
+/**\r
+ * Issue severities, from most severe to the least severe.\r
+ */\r
+public enum Severity {\r
+    FATAL, ERROR, WARNING, INFO, NOTE, UNKNOWN;\r
+\r
+    public static Severity moreSevere(Severity s1, Severity s2) {\r
+        if (s1 == null)\r
+            return s2;\r
+        if (s2 == null)\r
+            return s1;\r
+        return (s1.ordinal() < s2.ordinal()) ? s1 : s2;\r
+    }\r
+}
\ No newline at end of file