本文整理汇总了Java中com.ibm.icu.lang.UCharacter.getNumericValue方法的典型用法代码示例。如果您正苦于以下问题:Java UCharacter.getNumericValue方法的具体用法?Java UCharacter.getNumericValue怎么用?Java UCharacter.getNumericValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.icu.lang.UCharacter
的用法示例。
在下文中一共展示了UCharacter.getNumericValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNumericValue
import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
* Gets the numeric value of the specified Unicode code point. For example,
* the code point '\u216B' stands for the Roman number XII, which has the
* numeric value 12.
*
* @param codePoint
* the Unicode code point to get the numeric value of.
* @return a non-negative numeric integer value if a numeric value for
* {@code codePoint} exists, -1 if there is no numeric value for
* {@code codePoint}, -2 if the numeric value can not be
* represented with an integer.
*/
public static int getNumericValue(int codePoint) {
return UCharacter.getNumericValue(codePoint);
}
示例2: getNumericValue
import com.ibm.icu.lang.UCharacter; //导入方法依赖的package包/类
/**
* Gets the numeric value of the Unicode character.
*
* @param codePoint
* the character, including supplementary characters
* @return a numeric int value which is not negative, -1 if there is no numeric value, -2 if
* the numeric value is negative
*/
public static int getNumericValue(int codePoint) {
return UCharacter.getNumericValue(codePoint);
}