Formatting
[jalview.git] / src / com / stevesoft / pat / Prop.java
1 //\r
2 // This software is now distributed according to\r
3 // the Lesser Gnu Public License.  Please see\r
4 // http://www.gnu.org/copyleft/lesser.txt for\r
5 // the details.\r
6 //    -- Happy Computing!\r
7 //\r
8 package com.stevesoft.pat;\r
9 \r
10 /** Get Unicode properties for a character.  See\r
11  <a href="http://unicode.org">http://unicode.org</a>. */\r
12 public class Prop\r
13 {\r
14   /** Is this a "Decimal Digit" according to Unicode? */\r
15   public final static boolean isDecimalDigit(char c)\r
16   {\r
17     if (Bits.decimal_digit == null)\r
18     {\r
19       Bits.decimal_digit_f();\r
20     }\r
21     return Bits.decimal_digit.get(c);\r
22   }\r
23 \r
24   /** Is this a "Alphabetic" according to Unicode? */\r
25   public final static boolean isAlphabetic(char c)\r
26   {\r
27     if (Bits.letter == null)\r
28     {\r
29       Bits.letter_f();\r
30     }\r
31     return Bits.letter.get(c);\r
32   }\r
33 \r
34   /** Is this a "Math" according to Unicode? */\r
35   public final static boolean isMath(char c)\r
36   {\r
37     if (Bits.math == null)\r
38     {\r
39       Bits.math_f();\r
40     }\r
41     return Bits.math.get(c);\r
42   }\r
43 \r
44   /** Is this a "Currency" according to Unicode? */\r
45   public final static boolean isCurrency(char c)\r
46   {\r
47     if (Bits.currency == null)\r
48     {\r
49       Bits.currency_f();\r
50     }\r
51     return Bits.currency.get(c);\r
52   }\r
53 \r
54   /** Is c a white space character according to Unicode? */\r
55   public final static boolean isWhite(char c)\r
56   {\r
57     if (Bits.white == null)\r
58     {\r
59       Bits.white_f();\r
60     }\r
61     return Bits.white.get(c);\r
62   }\r
63 \r
64   /** Is c a punctuation character according to Unicode? */\r
65   public final static boolean isPunct(char c)\r
66   {\r
67     if (Bits.punct == null)\r
68     {\r
69       Bits.punct_f();\r
70     }\r
71     return Bits.punct.get(c);\r
72   }\r
73 }\r