本文整理汇总了Java中net.sf.memoranda.date.CalendarDate.after方法的典型用法代码示例。如果您正苦于以下问题:Java CalendarDate.after方法的具体用法?Java CalendarDate.after怎么用?Java CalendarDate.after使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.memoranda.date.CalendarDate
的用法示例。
在下文中一共展示了CalendarDate.after方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**s
* @see net.sf.memoranda.Task#getStatus()
*/
public int getStatus(CalendarDate date) {
CalendarDate start = getStartDate();
CalendarDate end = getEndDate();
if (isFrozen())
return Task.FROZEN;
if (isCompleted())
return Task.COMPLETED;
if (date.inPeriod(start, end)) {
if (date.equals(end))
return Task.DEADLINE;
else
return Task.ACTIVE;
}
else if(date.before(start)) {
return Task.SCHEDULED;
}
if(start.after(end)) {
return Task.ACTIVE;
}
return Task.FAILED;
}
示例2: getLatestEndDateFromSubTasks
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* Looks through the entire sub task tree and corrects any inconsistencies in start dates
*
* @param t
* @return
*/
public CalendarDate getLatestEndDateFromSubTasks(Task t) {
CalendarDate d = t.getEndDate();
if (hasSubTasks(t.getID())) {
Collection subTasks = getAllSubTasks(t.getID());
for (Iterator iter = subTasks.iterator(); iter.hasNext();) {
Task e = (Task) iter.next();
CalendarDate dd = getLatestEndDateFromSubTasks(e);
if(dd.after(d)) {
d = dd;
}
}
t.setEndDate(d);
return d;
}
else {
return t.getEndDate();
}
}
示例3: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Project#getStatus(CalendarDate)
*/
public int getStatus(CalendarDate date) {
// There's no way to tell when a project was frozen, so a project that
// is frozen is frozen at any date
if (isFrozen()) {
return Project.FROZEN;
}
if (getEndDate() == null) {
if (date.before(getStartDate())) {
return Project.SCHEDULED;
} else {
return Project.ACTIVE;
}
} else if (date.inPeriod(getStartDate(), getEndDate())) {
return Project.ACTIVE;
} else if (date.after(getEndDate())) {
return Project.COMPLETED;
} else {
return Project.SCHEDULED;
}
}
示例4: getLatestEndDateFromSubTasks
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see [email protected](Task)
* This implementation looks through the entire sub task tree and corrects
* any inconsistencies in start dates
*/
public CalendarDate getLatestEndDateFromSubTasks(Task t) {
CalendarDate d = t.getEndDate();
if (hasSubTasks(t.getID())) {
Collection subTasks = getAllSubTasks(t.getID());
for (Iterator iter = subTasks.iterator(); iter.hasNext();) {
Task e = (Task) iter.next();
CalendarDate dd = getLatestEndDateFromSubTasks(e);
if(dd.after(d)) {
d = dd;
}
}
t.setEndDate(d);
return d;
}
else {
return t.getEndDate();
}
}
示例5: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Task#getStatus(CalendarDate)
*/
public int getStatus(CalendarDate date) {
CalendarDate start = getStartDate();
CalendarDate end = getEndDate();
if (isFrozen())
return Task.FROZEN;
if (isCompleted())
return Task.COMPLETED;
if (date.inPeriod(start, end)) {
if (date.equals(end))
return Task.DEADLINE;
else
return Task.ACTIVE;
}
else if(date.before(start)) {
return Task.SCHEDULED;
}
if(start.after(end)) {
return Task.ACTIVE;
}
return Task.FAILED;
}
示例6: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**s
* @see net.sf.memoranda.Task#getStatus()
*/
public int getStatus(CalendarDate date) {
CalendarDate start = getStartDate();
CalendarDate end = getEndDate();
if (isFrozen())
return Task.FROZEN;
if (isCompleted())
return Task.COMPLETED;
if (CalendarDate.today().inPeriod(start, end)) {
if (CalendarDate.today().equals(end))
return Task.DEADLINE;
else
return Task.ACTIVE;
}
else if(date.before(start)) {
return Task.SCHEDULED;
}
if(start.after(end)) {
return Task.ACTIVE;
}
return Task.OVERDUE;
}
示例7: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Project#getStatus()
*/
public int getStatus() {
if (isFrozen())
return Project.FROZEN;
CalendarDate today = CurrentDate.get();
CalendarDate prStart = getStartDate();
CalendarDate prEnd = getEndDate();
if (prEnd == null) {
if (today.before(prStart))
return Project.SCHEDULED;
else
return Project.ACTIVE;
}
if (today.inPeriod(prStart, prEnd))
return Project.ACTIVE;
else if (today.after(prEnd)) {
//if (getProgress() == 100)
return Project.COMPLETED;
/*else
return Project.FAILED;*/
}
else
return Project.SCHEDULED;
}
示例8: getStatus
import net.sf.memoranda.date.CalendarDate; //导入方法依赖的package包/类
/**
* @see net.sf.memoranda.Project#getStatus()
*/
public int getStatus() {
if (isFrozen())
return Project.FROZEN;
CalendarDate today = CurrentDate.get();
CalendarDate prStart = getStartDate();
CalendarDate prEnd = getEndDate();
if (prEnd == null) {
if (today.before(prStart))
return Project.SCHEDULED;
else
return Project.ACTIVE;
}
if (today.inPeriod(prStart, prEnd))
return Project.ACTIVE;
else if (today.after(prEnd)) {
//if (getProgress() == 100)
return Project.COMPLETED;
/*else
return Project.FAILED;*/
}
else
return Project.SCHEDULED;
}