当前位置: 首页>>代码示例>>Java>>正文


Java UnicodeBlock.GURMUKHI属性代码示例

本文整理汇总了Java中java.lang.Character.UnicodeBlock.GURMUKHI属性的典型用法代码示例。如果您正苦于以下问题:Java UnicodeBlock.GURMUKHI属性的具体用法?Java UnicodeBlock.GURMUKHI怎么用?Java UnicodeBlock.GURMUKHI使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.lang.Character.UnicodeBlock的用法示例。


在下文中一共展示了UnicodeBlock.GURMUKHI属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: classify

/**
 * Given a unicode block object, return corresponding language constant.
 * If the block is not recognized, returns zero.  Note that as there
 * is no separate ARABIC block in Character, this case must
 * be specially handled by the caller; EASTERN_ARABIC is preferred when
 * both are specified.
 * @param b the unicode block to classify
 * @return the language constant, or zero if not recognized
 */
private int classify(UnicodeBlock b)
{
  if (b == null)
    return 0;
  // ARABIC is handled by the caller; from testing we know
  // that EASTERN_ARABIC takes precedence.
  if (b == UnicodeBlock.ARABIC)
    return EASTERN_ARABIC;
  if (b == UnicodeBlock.BENGALI)
    return BENGALI;
  if (b == UnicodeBlock.DEVANAGARI)
    return DEVANAGARI;
  if (b == UnicodeBlock.ETHIOPIC)
    return ETHIOPIC;
  if (b == UnicodeBlock.BASIC_LATIN
      || b == UnicodeBlock.LATIN_1_SUPPLEMENT
      || b == UnicodeBlock.LATIN_EXTENDED_A
      || b == UnicodeBlock.LATIN_EXTENDED_ADDITIONAL
      || b == UnicodeBlock.LATIN_EXTENDED_B)
    return EUROPEAN;
  if (b == UnicodeBlock.GUJARATI)
    return GUJARATI;
  if (b == UnicodeBlock.GURMUKHI)
    return GURMUKHI;
  if (b == UnicodeBlock.KANNADA)
    return KANNADA;
  if (b == UnicodeBlock.KHMER)
    return KHMER;
  if (b == UnicodeBlock.LAO)
    return LAO;
  if (b == UnicodeBlock.MALAYALAM)
    return MALAYALAM;
  if (b == UnicodeBlock.MONGOLIAN)
    return MONGOLIAN;
  if (b == UnicodeBlock.MYANMAR)
    return MYANMAR;
  if (b == UnicodeBlock.ORIYA)
    return ORIYA;
  if (b == UnicodeBlock.TAMIL)
    return TAMIL;
  if (b == UnicodeBlock.TELUGU)
    return TELUGU;
  if (b == UnicodeBlock.THAI)
    return THAI;
  if (b == UnicodeBlock.TIBETAN)
    return TIBETAN;
  return 0;
}
 
开发者ID:vilie,项目名称:javify,代码行数:57,代码来源:NumericShaper.java


注:本文中的java.lang.Character.UnicodeBlock.GURMUKHI属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。