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