⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 normalizezenkakureader.java

📁 免疫遗传算法java语言版源程序
💻 JAVA
字号:
/**
 * IgaLib -> String
 * Copyright (C) 2001  Tosiki IGA , IgaLib project member
 *   (http://homepage2.nifty.com/igat/igapyon/index.html)
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package jp.ne.nifty.iga.tosiki.string;

import java.io.*;

/**
 * 慡妏傪揔惓壔偟偰撉傒崬傓Reader僋儔僗偱偡丅敿妏僇僞僇僫偼慡妏壔偟慡妏塸悢偼敿妏壔偟傑偡<BR>
 *
 * 偙偺僋儔僗傪棙梡偡傞偲 敿妏僇僞僇僫仺慡妏曄姺偟丄傑偨慡妏塸悢傪敿妏曄姺偟側偑傜
 * 張棟傪恑傔偰偄偒傑偡丅戺壒傕張棟懳徾偲側偭偰偍傝傑偡丅
 * 偙偺傛偆偵偡傞偙偲偵傛傝丄摨堦偺傕偺傪昞偡傋偒 敿妏丒慡妏傪 摑堦偟偨宍偱
 * 惓婯壔偡傞偙偲偑偱偒傑偡丅
 *
 * @author Tosiki IGA
 */
public class NormalizeZenkakuReader
	extends ZenkakuReader
{
	/**
	 * 慡妏傪揔惓壔曄姺偟偰偄偔僋儔僗偺僐儞僗僩儔僋僞
	 *
	 * @param Reader reader 楢寢偡傞尦偺Reader
	 */
	public NormalizeZenkakuReader(Reader reader)
	{
		super(reader);
	}

	/**
	 * 1暥帤Reader偐傜撉傒崬傒傑偡丅
	 *
	 * @return int 撉傒崬傫偩暥帤楍
	 * @throws IOException 壗偐偟傜偺I/O椺奜
	 */
	public int read()
		throws IOException
	{
		int iRead=reader.read();
		if(iRead<0)
		{
			return iRead;
		}

		// 敿妏僇僞僇僫偼慡妏壔偟傑偡丅
		int iReturn=ZenkakuTable.checkHankakuKatakana(reader,iRead);
		if(iReturn>=0)
		{
			return iReturn;
		}

		// 慡妏ASCII偼敿妏壔偟傑偡丅
		iReturn=ZenkakuTable.checkZenkakuAscii(reader,iRead);
		if(iReturn>=0)
		{
			return iReturn;
		}

		return iRead;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -