needed for applet search
[jalview.git] / src / com / stevesoft / pat / NoPattern.java
diff --git a/src/com/stevesoft/pat/NoPattern.java b/src/com/stevesoft/pat/NoPattern.java
new file mode 100755 (executable)
index 0000000..3bac329
--- /dev/null
@@ -0,0 +1,19 @@
+package//\r
+// This software is now distributed according to\r
+// the Lesser Gnu Public License.  Please see\r
+// http://www.gnu.org/copyleft/lesser.txt for\r
+// the details.\r
+//    -- Happy Computing!\r
+//\r
+com.stevesoft.pat;\r
+import java.util.*;\r
+\r
+/** The idea behind this class is simply to eliminate the need for\r
+  * testing to see if Regex.thePattern is null.  Every instruction\r
+  * we can eliminate from _search will help.\r
+  */\r
+public class NoPattern extends Pattern {\r
+    public String toString() { return "(?e=#)[^#d#D]"; }\r
+    public int matchInternal(int i,Pthings p) { return -1; }\r
+    Pattern clone1(Hashtable h) { return new NoPattern(); }\r
+}\r