没有合适的资源?快使用搜索试试~ 我知道了~
CharactorGet
需积分: 7 0 下载量 51 浏览量
2014-12-07
17:29:03
上传
评论
收藏 59KB TXT 举报
温馨提示
试读
32页
取出输入汉字的首字母
资源推荐
资源详情
资源评论
package www.canway.net;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;
/**
* µÚ3Ìâ--È¡³öÊäÈ뺺×ÖµÄÊ××Öĸ
* @author JiongweiWang
* @version 1.0
* @since JDK1.7
*/
public class CharactorGet {
//speelTreeÓÃÓÚ´æ´¢GB2312Ò»¼¶ºº×Ö
private static TreeMap<Integer, String> spellTree = new TreeMap<Integer, String>();
//ÀûÓþ²Ì¬´úÂë¿é¶Ô¾²Ì¬µÄspellTree±äÁ¿¸³Öµ
static {
initTreeMap();
}
//¹¹Ô캯Êı
private CharactorGet() {
}
//¶ÔspellTree¸³Öµ£¬keyΪasciiÖµ£¬valueΪƴÒô
private static void initTreeMap() {
spellTree.put(-20319, "A");
spellTree.put(-20317, "Ai");
spellTree.put(-20304, "An");
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Scanner;
import java.util.TreeMap;
/**
* µÚ3Ìâ--È¡³öÊäÈ뺺×ÖµÄÊ××Öĸ
* @author JiongweiWang
* @version 1.0
* @since JDK1.7
*/
public class CharactorGet {
//speelTreeÓÃÓÚ´æ´¢GB2312Ò»¼¶ºº×Ö
private static TreeMap<Integer, String> spellTree = new TreeMap<Integer, String>();
//ÀûÓþ²Ì¬´úÂë¿é¶Ô¾²Ì¬µÄspellTree±äÁ¿¸³Öµ
static {
initTreeMap();
}
//¹¹Ô캯Êı
private CharactorGet() {
}
//¶ÔspellTree¸³Öµ£¬keyΪasciiÖµ£¬valueΪƴÒô
private static void initTreeMap() {
spellTree.put(-20319, "A");
spellTree.put(-20317, "Ai");
spellTree.put(-20304, "An");
spellTree.put(-20295, "Ang");
spellTree.put(-20292, "Ao");
spellTree.put(-20283, "Ba");
spellTree.put(-20265, "Bai");
spellTree.put(-20257, "Ban");
spellTree.put(-20242, "Bang");
spellTree.put(-20230, "Bao");
spellTree.put(-20051, "Bei");
spellTree.put(-20036, "Ben");
spellTree.put(-20032, "Beng");
spellTree.put(-20026, "Bi");
spellTree.put(-20002, "Bian");
spellTree.put(-19990, "Biao");
spellTree.put(-19986, "Bie");
spellTree.put(-19982, "Bin");
spellTree.put(-19976, "Bing");
spellTree.put(-19805, "Bo");
spellTree.put(-19784, "Bu");
spellTree.put(-19775, "Ca");
spellTree.put(-19774, "Cai");
spellTree.put(-19763, "Can");
spellTree.put(-19756, "Cang");
spellTree.put(-19751, "Cao");
spellTree.put(-19746, "Ce");
spellTree.put(-19741, "Ceng");
spellTree.put(-19739, "Cha");
spellTree.put(-19728, "Chai");
spellTree.put(-19725, "Chan");
spellTree.put(-19715, "Chang");
spellTree.put(-19540, "Chao");
spellTree.put(-20292, "Ao");
spellTree.put(-20283, "Ba");
spellTree.put(-20265, "Bai");
spellTree.put(-20257, "Ban");
spellTree.put(-20242, "Bang");
spellTree.put(-20230, "Bao");
spellTree.put(-20051, "Bei");
spellTree.put(-20036, "Ben");
spellTree.put(-20032, "Beng");
spellTree.put(-20026, "Bi");
spellTree.put(-20002, "Bian");
spellTree.put(-19990, "Biao");
spellTree.put(-19986, "Bie");
spellTree.put(-19982, "Bin");
spellTree.put(-19976, "Bing");
spellTree.put(-19805, "Bo");
spellTree.put(-19784, "Bu");
spellTree.put(-19775, "Ca");
spellTree.put(-19774, "Cai");
spellTree.put(-19763, "Can");
spellTree.put(-19756, "Cang");
spellTree.put(-19751, "Cao");
spellTree.put(-19746, "Ce");
spellTree.put(-19741, "Ceng");
spellTree.put(-19739, "Cha");
spellTree.put(-19728, "Chai");
spellTree.put(-19725, "Chan");
spellTree.put(-19715, "Chang");
spellTree.put(-19540, "Chao");
剩余31页未读,继续阅读
资源评论
wjw20105314
- 粉丝: 3
- 资源: 20
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功