java.text.Collator.getDecomposition()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(141)

本文整理了Java中java.text.Collator.getDecomposition()方法的一些代码示例,展示了Collator.getDecomposition()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Collator.getDecomposition()方法的具体详情如下:
包路径:java.text.Collator
类名称:Collator
方法名:getDecomposition

Collator.getDecomposition介绍

[英]Returns the decomposition rule for this collator.
[中]返回此排序器的分解规则。

代码示例

代码示例来源:origin: apache/phoenix

collator.getStrength(), collator.getDecomposition(),
BooleanUtils.isTrue(useSpecialUpperCaseCollator)));

代码示例来源:origin: com.salesforce.i18n/i18n-util

@Override
public synchronized int getDecomposition() {
  return this.originalCollator.getDecomposition();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.ibm.icu.base

/**
 * Returns the decomposition mode of this Collator. The decomposition mode
 * determines how Unicode composed characters are handled.
 * </p>
 * <p>
 * See the Collator class description for more details.
 * </p>
 * @return the decomposition mode
 * @see #setDecomposition
 * @see #NO_DECOMPOSITION
 * @see #CANONICAL_DECOMPOSITION
 * @stable ICU 2.8
 */
public int getDecomposition()
{
  return collator.getDecomposition();
}

代码示例来源:origin: at.bestsolution.eclipse/com.ibm.icu.base

/**
 * Returns the decomposition mode of this Collator. The decomposition mode
 * determines how Unicode composed characters are handled.
 * </p>
 * <p>
 * See the Collator class description for more details.
 * </p>
 * @return the decomposition mode
 * @see #setDecomposition
 * @see #NO_DECOMPOSITION
 * @see #CANONICAL_DECOMPOSITION
 * @stable ICU 2.8
 */
public int getDecomposition()
{
  return collator.getDecomposition();
}

代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core

collator.getStrength(), collator.getDecomposition(),
BooleanUtils.isTrue(useSpecialUpperCaseCollator)));

代码示例来源:origin: org.apache.phoenix/phoenix-core

collator.getStrength(), collator.getDecomposition(),
BooleanUtils.isTrue(useSpecialUpperCaseCollator)));

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

private final int getCaseDiff (final String text, final String pattern){
  final int savedStrength = m_collator.getStrength();
  final int savedDecomposition = m_collator.getDecomposition();
  m_collator.setStrength(Collator.TERTIARY);// not to ignore case  
  m_collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION );// corresponds NDF
   final int diff[] =getFirstCaseDiff (text, pattern, m_locale);
 m_collator.setStrength(savedStrength);// restore
 m_collator.setDecomposition(savedDecomposition); //restore
 if(diff != null){  
   if((m_caseOrder).equals("upper-first")){
     if(diff[0] == UPPER_CASE){
       return -1;
     }else{
       return 1;
     }
   }else{// lower-first
     if(diff[0] == LOWER_CASE){
       return -1;
     }else{
       return 1;
     }
   }
 }else{// No case differences
   return 0;
 }
 
}

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

private final int getCaseDiff (final String text, final String pattern){
  final int savedStrength = m_collator.getStrength();
  final int savedDecomposition = m_collator.getDecomposition();
  m_collator.setStrength(Collator.TERTIARY);// not to ignore case  
  m_collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION );// corresponds NDF
   final int diff[] =getFirstCaseDiff (text, pattern, m_locale);
 m_collator.setStrength(savedStrength);// restore
 m_collator.setDecomposition(savedDecomposition); //restore
 if(diff != null){  
   if((m_caseOrder).equals("upper-first")){
     if(diff[0] == UPPER_CASE){
       return -1;
     }else{
       return 1;
     }
   }else{// lower-first
     if(diff[0] == LOWER_CASE){
       return -1;
     }else{
       return 1;
     }
   }
 }else{// No case differences
   return 0;
 }
 
}

相关文章