needed for applet search
[jalview.git] / src / com / stevesoft / pat / Prop.java
diff --git a/src/com/stevesoft/pat/Prop.java b/src/com/stevesoft/pat/Prop.java
new file mode 100755 (executable)
index 0000000..9319db5
--- /dev/null
@@ -0,0 +1,52 @@
+//\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
+package com.stevesoft.pat;\r
+\r
+/** Get Unicode properties for a character.  See\r
+<a href="http://unicode.org">http://unicode.org</a>. */\r
+public class Prop {\r
+    /** Is this a "Decimal Digit" according to Unicode? */\r
+    public final static boolean isDecimalDigit(char c) {\r
+      if(Bits.decimal_digit == null)\r
+        Bits.decimal_digit_f();\r
+      return Bits.decimal_digit.get(c);\r
+    }\r
+    /** Is this a "Alphabetic" according to Unicode? */\r
+    public final static boolean isAlphabetic(char c) {\r
+      if(Bits.letter == null)\r
+        Bits.letter_f();\r
+      return Bits.letter.get(c);\r
+    }\r
+    /** Is this a "Math" according to Unicode? */\r
+    public final static boolean isMath(char c) {\r
+      if(Bits.math == null)\r
+        Bits.math_f();\r
+      return Bits.math.get(c);\r
+    }\r
+\r
+    /** Is this a "Currency" according to Unicode? */\r
+    public final static boolean isCurrency(char c) {\r
+      if(Bits.currency == null)\r
+        Bits.currency_f();\r
+      return Bits.currency.get(c);\r
+    }\r
+\r
+    /** Is c a white space character according to Unicode? */\r
+    public final static boolean isWhite(char c) {\r
+      if(Bits.white == null)\r
+        Bits.white_f();\r
+      return Bits.white.get(c);\r
+    }\r
+\r
+    /** Is c a punctuation character according to Unicode? */\r
+    public final static boolean isPunct(char c) {\r
+      if(Bits.punct == null)\r
+        Bits.punct_f();\r
+      return Bits.punct.get(c);\r
+    }\r
+}\r