本文整理了Java中org.sakaiproject.time.api.Time.before()
方法的一些代码示例,展示了Time.before()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Time.before()
方法的具体详情如下:
包路径:org.sakaiproject.time.api.Time
类名称:Time
方法名:before
[英]Is this time before the other time?
[中]这一次比另一次早吗?
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
/**
* is this time in my range?
*
* @param time:
* the time to check for inclusion
* @return true if the time is in the range, false if not
*/
public boolean contains(Time time)
{
// assume in range, unless proven otherwise
boolean inRange = true;
// if out of the range...
if (time.before(m_startTime) || time.after(m_endTime))
{
inRange = false;
}
// if at begin and begin not in range
else if ((!m_startIncluded) && time.equals(m_startTime))
{
inRange = false;
}
// if at the end and end not in range
else if ((!m_endIncluded) && time.equals(m_endTime))
{
inRange = false;
}
return inRange;
} // contains
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
/**
* peer assessment is set for this assignment but the close time hasn't passed
* @return
*/
public boolean isPeerAssessmentPending(){
if(getAllowPeerAssessment()){
Time now = TimeService.newTime();
return now.before(getCloseTime());
}else{
return false;
}
}
/**
代码示例来源:origin: sakaiproject/sakai
MessageHeader header = item.getHeader();
Time newTime = header.getDate();
if ( pubDate == null || newTime.before(pubDate) ) pubDate = newTime;
String newText = getSummaryFromHeader(item, header);
if ( summaryText == null ) {
代码示例来源:origin: sakaiproject/sakai
if (m_user.getDate(candidate).before(afterDate))
代码示例来源:origin: org.sakaiproject.message/sakai-message-impl
MessageHeader header = item.getHeader();
Time newTime = header.getDate();
if ( pubDate == null || newTime.before(pubDate) ) pubDate = newTime;
String newText = getSummaryFromHeader(item, header);
if ( summaryText == null ) {
代码示例来源:origin: org.sakaiproject/sakai-chat-impl
if ( pubDate == null || newTime.before(pubDate) ) pubDate = newTime;
try {
String newText = getSummaryFromHeader(item);
代码示例来源:origin: org.sakaiproject.message/sakai-message-util
MessageHeader header = item.getHeader();
Time newTime = header.getDate();
if ( pubDate == null || newTime.before(pubDate) ) pubDate = newTime;
String newText = getSummaryFromHeader(item, header);
if ( summaryText == null ) {
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-storage-util
if (m_user.getDate(candidate).before(afterDate))
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
/**
* peer assessment is set for this assignment and the current time
* falls between the assignment close time and the peer asseessment period time
* @return
*/
public boolean isPeerAssessmentOpen(){
if(getAllowPeerAssessment()){
Time now = TimeService.newTime();
return now.before(getPeerAssessmentPeriod()) && now.after(getCloseTime());
}else{
return false;
}
}
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
else if (t1.before(t2))
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
public void delay(Event event, Time fireTime)
{
Time now = timeService().newTime();
if (fireTime == null || fireTime.before(now))
{
postEvent(event);
}
else
{
if (delayHandler != null)
{
// Make sure there is a userid associated with the event
String id = event.getUserId();
if (id == null)
{
id = sessionManager().getCurrentSessionUserId();
}
if (id == null)
{
id = UNKNOWN_USER;
}
delayHandler.createDelay(event, id, fireTime);
}
else
{
log.warn("Unable to create delayed event because delay handler is unset. Firing now.");
postEvent(event);
}
}
}
代码示例来源:origin: org.sakaiproject.announcement/sakai-announcement-impl
if (now.before(releaseDate))
代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl
available = currentEntity.getReleaseDate().before(now);
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
else if (show == AssignmentConstants.MODEL_ANSWER_SHOW_TO_STUDENT_AFTER_ACCEPT_UTIL && (a.getCloseTime().before(TimeService.newTime())))
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
return (allowResubmitNumber > 0 /* additional submission number allowed */ || allowResubmitNumber == -1 /* unlimited submission times allowed */) && resubmitCloseTime != null && currentTime.before(resubmitCloseTime);
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
/**
* @inheritDoc
*/
public String getStatus()
{
Time currentTime = TimeService.newTime();
if (this.getDraft())
return rb.getString("gen.dra1");
else if (this.getOpenTime().after(currentTime))
return rb.getString("gen.notope");
else if (this.getDueTime().after(currentTime))
return rb.getString("gen.open");
else if ((this.getCloseTime() != null) && (this.getCloseTime().before(currentTime)))
return rb.getString("gen.closed");
else
return rb.getString("gen.due");
}
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
&& a.getOpenTime().before(TimeService.newTime())) {
代码示例来源:origin: org.sakaiproject.message/sakai-message-util
if (now.before(edit.getHeader().getDate()) && priority != NotificationService.NOTI_NONE)
代码示例来源:origin: org.sakaiproject.message/sakai-message-impl
boolean transientNotification = true;
if (now.before(edit.getHeader().getDate()) && priority != NotificationService.NOTI_NONE)
代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl
if (returnTime != null && returnTime.before(submitTime))
内容来源于网络,如有侵权,请联系作者删除!