📄 p_event.java
字号:
package test1;
public class P_Event {
protected int id;
protected double timestamp;
protected char type;
protected int attribute;
protected boolean[] flag;
public void setflag(int i)
{
flag[i]=false;
}
public void initflag(Leaf n)
{
flag=new boolean[n.getparent().size()];
for(int i=0;i<flag.length;i++)
flag[i]=true;
}
public boolean getflag(int i)
{
return flag[i];
}
public int getid()
{
return id;
}
public double gettimestamp()
{
return timestamp;
}
public char gettype()
{
return type;
}
public P_Event(){}
public P_Event(int num,double t,char c)
{
id=num;
timestamp=t;
type=c;
}
public boolean checkearlier(double t)
{
if(timestamp<t) return true;
else return false;
}
public boolean checkIn(double t1,double t2)
{
if(timestamp>=t1&×tamp<=t2) return true;
else return false;
}
public boolean compareEarly(P_Event e)
{
if(timestamp<=e.gettimestamp()) return true;
else return false;
}
public boolean compareEarly(C_Event e)
{
if(timestamp<=e.gett_start()) return true;
else return false;
}
public boolean checkdelete()
{
int i;
for(i=0;i<flag.length;i++)
{
if(flag[i]) break;
}
if(i==flag.length) return true;
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -