📄 noticebean.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: noticeBean.java
package common.flyhigh;
import Base.DataBean.DefaultDataBean;
import java.io.PrintStream;
import java.text.DateFormat;
import java.util.Date;
public class noticeBean
{
public Date start[];
public Date end[];
private Date weekstart;
private Date weekend;
public String name[];
public int id[];
DefaultDataBean db;
DateFormat df;
public int next;
private int count;
private int j;
public noticeBean()
{
db = null;
df = DateFormat.getDateInstance();
next = 0;
j = 0;
}
public void Init(DefaultDataBean defaultdatabean)
{
db = defaultdatabean;
count = db.getCount("notice");
start = new Date[count];
end = new Date[count];
name = new String[count];
id = new int[count];
for(int i = 0; i < count; i++)
try
{
start[i] = df.parse(db.getAttributeStr("notice.start", i));
end[i] = df.parse(db.getAttributeStr("notice.end", i));
name[i] = db.getAttributeStr("notice.name", i);
id[i] = Integer.parseInt(db.getAttributeStr("notice.id", i));
}
catch(Exception e) {
System.out.println(e.toString());
}
}
public boolean nextNotice()
{
boolean flag = false;
for(; next < count; next++)
{
System.out.println("nextnotice is " + next + "count is" + count);
if(start[next].compareTo(weekstart) <= 0 && end[next].compareTo(weekstart) >= 0 || start[next].compareTo(weekstart) >= 0 && start[next].compareTo("weekend") <= 0)
{
flag = true;
return flag;
}
}
return flag;
}
public String getNoticeName()
{
return name[next];
}
public int getNoticeId()
{
return id[next];
}
public void setZero()
{
next = 0;
}
public void addNext()
{
next = next + 1;
}
public void setWeek(int i)
{
weekstart = new Date();
weekend = new Date();
for(int k = 0; k < db.getCount("weeks"); k++)
{
System.out.println(Integer.parseInt(db.getAttributeStr("weeks.weeknum", k)));
if(i != Integer.parseInt(db.getAttributeStr("weeks.weeknum", k)))
continue;
try
{
weekstart = df.parse(db.getAttributeStr("weeks.start", k));
weekend = df.parse(db.getAttributeStr("weeks.end", k));
System.out.println(i + " ok" + weekstart + ":" + weekend);
}
catch(Exception exception) { }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -