abstractindexer.java

来自「一个用于搜索本地文件内容的小型搜索引擎」· Java 代码 · 共 28 行

JAVA
28
字号
package invertedList;

import java.io.File;

import stemmer.IStemmer;

/**
 * @author Administrator
 * an abstract class, which represents an indexer
 */
public abstract class AbstractIndexer {
	/**
	 * In the indexing process, the indexer will use the stemmer to stem every word
	 * that it extracts from the document.
	 */
	protected IStemmer stemmer;
	/**
	 * the indexer will use the factory to get the extractor, so it can get the content
	 * of the document
	 */
	protected ExtractorFactory factory;
	/**
	 * @param file
	 * this method is used to index a specific file
	 */
	abstract void doindex(File file);
}

⌨️ 快捷键说明

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