]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.utils/src/org/simantics/utils/strings/ValidatorUtils.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.utils / src / org / simantics / utils / strings / ValidatorUtils.java
index 45c027f993025b0fe9444c0fd12d4ca24bf624dd..e25c2674dcb94bd8e025c9a6c86bba3a9a948077 100644 (file)
@@ -1,42 +1,42 @@
-package org.simantics.utils.strings;\r
-\r
-import java.util.Collection;\r
-import java.util.Collections;\r
-import java.util.regex.Pattern;\r
-\r
-public class ValidatorUtils {\r
-\r
-       public static Pattern alphaNumericPattern(int length) {\r
-\r
-               String pattern = "^(_|\\p{Alnum}){1," + length + "}+$";\r
-               return Pattern.compile(pattern);\r
-               \r
-       }\r
-       \r
-       public static Collection<StringInputProblem> errorProblem(final String text) {\r
-               return Collections.<StringInputProblem>singletonList(new StringInputProblem() {\r
-                       \r
-                       @Override\r
-                       public Severity getSeverity() {\r
-                               return Severity.Error;\r
-                       }\r
-                       \r
-                       @Override\r
-                       public int getEnd() {\r
-                               return 0;\r
-                       }\r
-                       \r
-                       @Override\r
-                       public String getDescription() {\r
-                               return text;\r
-                       }\r
-                       \r
-                       @Override\r
-                       public int getBegin() {\r
-                               return 0;\r
-                       }\r
-                       \r
-               });\r
-       }\r
-       \r
-}\r
+package org.simantics.utils.strings;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.regex.Pattern;
+
+public class ValidatorUtils {
+
+       public static Pattern alphaNumericPattern(int length) {
+
+               String pattern = "^(_|\\p{Alnum}){1," + length + "}+$";
+               return Pattern.compile(pattern);
+               
+       }
+       
+       public static Collection<StringInputProblem> errorProblem(final String text) {
+               return Collections.<StringInputProblem>singletonList(new StringInputProblem() {
+                       
+                       @Override
+                       public Severity getSeverity() {
+                               return Severity.Error;
+                       }
+                       
+                       @Override
+                       public int getEnd() {
+                               return 0;
+                       }
+                       
+                       @Override
+                       public String getDescription() {
+                               return text;
+                       }
+                       
+                       @Override
+                       public int getBegin() {
+                               return 0;
+                       }
+                       
+               });
+       }
+       
+}