aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/util/WebUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/util/WebUtils.java')
-rw-r--r--juick-server/src/main/java/com/juick/util/WebUtils.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/juick-server/src/main/java/com/juick/util/WebUtils.java b/juick-server/src/main/java/com/juick/util/WebUtils.java
deleted file mode 100644
index 8e240c5d..00000000
--- a/juick-server/src/main/java/com/juick/util/WebUtils.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.juick.util;
-
-import java.util.regex.Pattern;
-
-/**
- * Created by aalexeev on 11/28/16.
- */
-public class WebUtils {
- private WebUtils() {
- throw new IllegalStateException();
- }
-
- private static final Pattern USER_NAME_PATTERN = Pattern.compile("[a-zA-Z-_\\d]{2,16}");
-
- private static final Pattern POST_NUMBER_PATTERN = Pattern.compile("-?\\d+");
-
- private static final Pattern JID_PATTERN = Pattern.compile("^[a-zA-Z0-9\\\\-\\\\_\\\\@\\\\.]{6,64}$");
-
-
- public static boolean isPostNumber(final String aString) {
- return aString != null && POST_NUMBER_PATTERN.matcher(aString).matches();
- }
-
- public static boolean isNotPostNumber(final String aString) {
- return !isPostNumber(aString);
- }
-
- public static boolean isUserName(final String aString) {
- return aString != null && USER_NAME_PATTERN.matcher(aString).matches();
- }
-
- public static boolean isNotUserName(final String aString) {
- return !isUserName(aString);
- }
-
- public static boolean isJid(final String aString) {
- return aString != null && JID_PATTERN.matcher(aString).matches();
- }
-
- public static boolean isNotJid(final String aString) {
- return !isJid(aString);
- }
-
-
-}