< prev index next >

src/java.base/share/classes/java/util/regex/EmojiData.java.template

Print this page




  23  * questions.
  24  */
  25 
  26 package java.util.regex;
  27 
  28 /**
  29  * Holds data contained in the Unicode Technical Standard #51: Unicode
  30  * Emoji. 
  31  * 
  32  * Currently it is only used for the rule "GB11" in UAX #29 Unicode Text
  33  * Segmentation.
  34  */
  35 final class EmojiData {
  36     /**
  37      * Returns whether the code point is an extended pictographic or not.
  38      *
  39      * @param cp code point to examine
  40      * @return true if {@code cp} is an extended pictographic
  41      */
  42     static boolean isExtendedPictographic(int cp) {
  43         if (cp < 0x2000) {
  44             return
  45 %%%EXTPICT_LOW%%%
  46         } else {
  47             return isHigh(cp);
  48         }
  49     }
  50 
  51     private static boolean isHigh(int cp) {
  52         return
  53 %%%EXTPICT_HIGH%%%
  54     }
  55 }


  23  * questions.
  24  */
  25 
  26 package java.util.regex;
  27 
  28 /**
  29  * Holds data contained in the Unicode Technical Standard #51: Unicode
  30  * Emoji. 
  31  * 
  32  * Currently it is only used for the rule "GB11" in UAX #29 Unicode Text
  33  * Segmentation.
  34  */
  35 final class EmojiData {
  36     /**
  37      * Returns whether the code point is an extended pictographic or not.
  38      *
  39      * @param cp code point to examine
  40      * @return true if {@code cp} is an extended pictographic
  41      */
  42     static boolean isExtendedPictographic(int cp) {









  43         return
  44 %%%EXTPICT%%%
  45     }
  46 }
< prev index next >