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


Java UScript.hasScript方法代码示例

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


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

示例1: has

import com.ibm.icu.lang.UScript; //导入方法依赖的package包/类
@Override
public boolean has(int codePoint, int value) {
    // See https://ssl.icu-project.org/trac/ticket/13462
    switch (codePoint) {
    case 0x3000:
    case 0x3004:
    case 0x3012:
    case 0x3020:
    case 0x3036:
        return value == UScript.COMMON;
    }
    return UScript.hasScript(codePoint, value);
}
 
开发者ID:anba,项目名称:es6draft,代码行数:14,代码来源:UnicodeData.java

示例2: contains

import com.ibm.icu.lang.UScript; //导入方法依赖的package包/类
@Override
public boolean contains(int c) {
    return UScript.hasScript(c, script);
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:5,代码来源:UnicodeSet.java

示例3: includesCharacter

import com.ibm.icu.lang.UScript; //导入方法依赖的package包/类
public boolean includesCharacter(int codePoint)
{
	if (includedScripts == null && excludedScripts == null)
	{
		return true;
	}
	
	int codeScript = UScript.getScript(codePoint);
	if (codeScript == UScript.UNKNOWN)
	{
		//include by default
		return true;
	}
	
	if (codeScript == UScript.COMMON)
	{
		//COMMON is included unless explicitly excluded
		return !excludedCommon;
	}
	
	if (codeScript == UScript.INHERITED)
	{
		//INHERITED is included unless explicitly excluded
		return !excludedInherited;
	}
	
	if (includedScripts != null && includedScripts.contains(codeScript))
	{
		//the codepoint script is explicitly included
		return true;
	}
	
	if (excludedScripts != null && excludedScripts.contains(codeScript))
	{
		//the codepoint script is explicitly excluded
		return false;
	}
	
	if (includedScripts == null)
	{
		//not excluded
		return true;
	}
	
	for (Integer script : includedScripts)
	{
		if (UScript.hasScript(codePoint, script))
		{
			//included as a secondary/extension script
			return true;
		}
	}
	
	//not included
	return false;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:57,代码来源:CharScriptsSet.java


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