当前位置: 首页>>代码示例>>Java>>正文


Java CalendarDate.after方法代码示例

本文整理汇总了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;
  }
 
开发者ID:ser316asu,项目名称:SER316-Aachen,代码行数:28,代码来源:TaskImpl.java

示例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();
    }
}
 
开发者ID:ser316asu,项目名称:Neukoelln_SER316,代码行数:25,代码来源:TaskListImpl.java

示例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;
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:25,代码来源:ProjectImpl.java

示例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();
    }
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:24,代码来源:TaskListImpl.java

示例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;
}
 
开发者ID:ser316asu,项目名称:SER316-Dresden,代码行数:28,代码来源:TaskImpl.java

示例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;
  }
 
开发者ID:ser316asu,项目名称:Dahlem_SER316,代码行数:28,代码来源:TaskImpl.java

示例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;
}
 
开发者ID:ser316asu,项目名称:SER316-Ingolstadt,代码行数:27,代码来源:ProjectImpl.java

示例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;
}
 
开发者ID:ser316asu,项目名称:Reinickendorf_SER316,代码行数:27,代码来源:ProjectImpl.java


注:本文中的net.sf.memoranda.date.CalendarDate.after方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。