本文整理了Java中org.jboss.as.ejb3.timerservice.schedule.attribute.Year.getNextMatch()
方法的一些代码示例,展示了Year.getNextMatch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Year.getNextMatch()
方法的具体详情如下:
包路径:org.jboss.as.ejb3.timerservice.schedule.attribute.Year
类名称:Year
方法名:getNextMatch
暂无
代码示例来源:origin: wildfly/wildfly
private Calendar computeNextYear(Calendar nextCal) {
Integer nextYear = this.year.getNextMatch(nextCal);
if (nextYear == null || nextYear > Year.MAX_YEAR) {
return null;
}
int currentYear = nextCal.get(Calendar.YEAR);
// if the current year is a match, then nothing else to
// do. Just return back the calendar
if (currentYear == nextYear) {
return nextCal;
}
// If the next year is lesser than the current year, then
// we have no more timeouts for the calendar expression
if (nextYear < currentYear) {
return null;
}
// at this point we have chosen a year which is greater than the current
// year.
// set the chosen year
nextCal.set(Calendar.YEAR, nextYear);
// since we are moving to a different year (as compared to the current year),
// we should reset all other calendar attribute expressions appropriately, to their first possible
// values
nextCal.set(Calendar.MONTH, this.month.getFirstMatch());
nextCal.set(Calendar.DAY_OF_MONTH, 1);
resetTimeToFirstValues(nextCal);
// recompute date
nextCal = this.computeNextDate(nextCal);
return nextCal;
}
代码示例来源:origin: org.jboss.as/jboss-as-ejb3
Integer nextYear = this.year.getNextMatch(currentCal);
内容来源于网络,如有侵权,请联系作者删除!