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

📄 nonleaf.java

📁 RFID复杂事件处理系统的研究实验
💻 JAVA
字号:
package test;
import java.util.*;

public class NonLeaf extends Node {
	public static char commontype='z';
	protected int during=Integer.MAX_VALUE;
	protected int tl=0;
	protected int th=Integer.MAX_VALUE;;
	protected boolean isnew=true;
	protected String operator;
	protected Node lchild=null;
	protected Node rchild=null;
	protected LinkedList<C_Event> mid_result=new LinkedList<C_Event>();
	
	
	public NonLeaf()
	{
		super(commontype--);
		isleaf=false;
	}
	public NonLeaf(NonLeaf n,int t){
		super(commontype--);
		isleaf=false;
		lchild=n.getlchild();
		rchild=n.getrchild();
		during=t;
		tl=n.gettl();
		th=n.getth();
		operator=n.getoperator();
	}
	public NonLeaf(String o)
	{
		super(commontype--);
		isleaf=false;
		operator=new String(o);
	}
	public NonLeaf(NonLeaf n){
		super(n);
		this.lchild=n.getlchild();
		this.rchild=n.getrchild();		
		isleaf=false;
		tl=n.tl;
		th=n.th;
		during=n.getduring();
		operator=new String(n.operator);
		mid_result=new LinkedList<C_Event>();
	}
	
	
	public LinkedList<C_Event> getmid_result()
	{
		return mid_result;
	}
	public String getoperator()
	{
		return operator;
	}
	public int getduring()
	{
		return during;
	}
	public int gettl()
	{
		return tl;
	}
	public int getth()
	{
		return th;
	}
	public Node getlchild()
	{
		return lchild;
	}
	public Node getrchild()
	{
		return rchild;
	}
	public boolean getisnew()
	{
		return isnew;
	}
	
	
	
	
	void setoperator(String s)
	{
		operator=new String(s);
	}
	void setduring(int t)
	{
		during=t;
	}
	void settl(int t)
	{
		tl=t;
	}
	void setth(int t)
	{
		th=t;
	}
	void setlchild(Node n)
	{
		lchild=n;
	}
	void setrchild(Node n)
	{
		rchild=n;
	}
	void resetisnew()
	{
		isnew=false;
	}
	
	
	void add_mr(C_Event c)
	{
		mid_result.addLast(c);
	}	
	void delete(P_Event e)
	{
		for(int i=0;i<mid_result.size();i++)
		{
			if(mid_result.get(i).checkhHave(e));
			{
				mid_result.remove(i);
				i--;
			}
		}
	}
	
	boolean checkin(int t1,int t2)
	{
		for(int i=0;i<mid_result.size();i++)
			if(mid_result.get(i).checkIn(t1, t2)) return true;
	    return false;
	}
	
	//LinkedList<C_Event> work(int m,NonLeaf n1,Node n2){return null;}
	//C_Event work(Node n2,NonLeaf n1){return null;}
	//boolean work(int m,NonLeaf n){return false;}
	//boolean work(NonLeaf n){return false;}
}

⌨️ 快捷键说明

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