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

📄 operator_not.java

📁 java实现的全文搜索引擎
💻 JAVA
字号:
/**
 * Decorator Pattern
 */
package cn.edu.nju.software.ruse;

import java.io.File;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;

/**
 * @author spring
 *
 */
public class Operator_NOT extends Operator {

	/* (non-Javadoc)
	 * @see main.Operand#getPRI()
	 */
	public Operator_NOT() {
		desription = "NOT";
		PRI = PRI_NOT;
	}
	public int getPRI() {
		return PRI;
	}
	public HashSet<File> not(HashSet<File> x, Index index) {
//System.err.println("@Operator_NOT Doing the NOT operator.");
		File[] f = index.getFileNameIndex();
		HashSet<File> temp = new HashSet<File>();
		for(File item: f) {
			temp.add(item);
		}
		temp.removeAll(x);
		return temp;
	}

}

⌨️ 快捷键说明

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