本文整理了Java中org.apache.wicket.util.time.Time.add()
方法的一些代码示例,展示了Time.add()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Time.add()
方法的具体详情如下:
包路径:org.apache.wicket.util.time.Time
类名称:Time
方法名:add
[英]Adds the given Duration
to this Time
object, moving the time into the future.
[中]将给定的Duration
添加到此Time
对象,将时间移到未来。
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Creates a <code>TimeFrame</code> for a start <code>Time</code> and <code>Duration</code>.
*
* @param start
* the start <code>Time</code>
* @param duration
* the <code>Duration</code>
* @return the <code>TimeFrame</code>
* @throws IllegalArgumentException
* thrown if start <code>Time</code> value is before end <code>Time</code> value
*/
public static TimeFrame valueOf(final Time start, final Duration duration)
{
return new TimeFrame(start, start.add(duration));
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Creates a <code>TimeFrame</code> for a start <code>Time</code> and <code>Duration</code>.
*
* @param start
* the start <code>Time</code>
* @param duration
* the <code>Duration</code>
* @return the <code>TimeFrame</code>
* @throws IllegalArgumentException
* thrown if start <code>Time</code> value is before end <code>Time</code> value
*/
public static TimeFrame valueOf(final Time start, final Duration duration)
{
return new TimeFrame(start, start.add(duration));
}
代码示例来源:origin: org.apache.wicket/wicket-util
/**
* Creates a <code>TimeFrame</code> for a start <code>Time</code> and <code>Duration</code>.
*
* @param start
* the start <code>Time</code>
* @param duration
* the <code>Duration</code>
* @return the <code>TimeFrame</code>
* @throws IllegalArgumentException
* thrown if start <code>Time</code> value is before end <code>Time</code> value
*/
public static TimeFrame valueOf(final Time start, final Duration duration)
{
return new TimeFrame(start, start.add(duration));
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
startOfPeriod.add(frequency).fromNow().sleep();
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
startOfPeriod.add(frequency).fromNow().sleep();
代码示例来源:origin: org.apache.wicket/wicket-util
startOfPeriod.add(frequency).fromNow().sleep();
代码示例来源:origin: org.apache.wicket/wicket-util
/**
* Retrieves the next occurrence of this <code>TimeOfDay</code> on the given
* <code>Calendar</code>.
*
* @param calendar
* the <code>Calendar</code> to use
* @return the next occurrence of this <code>TimeOfDay</code> on the given <code>Calendar</code>
*/
public Time next(final Calendar calendar)
{
// Get this time of day today
final Time timeToday = Time.valueOf(calendar, this);
// If it has already passed
if (timeToday.before(Time.now()))
{
// Return the time tomorrow
return Time.valueOf(calendar, this).add(Duration.ONE_DAY);
}
else
{
// Time hasn't happened yet today
return timeToday;
}
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Retrieves the next occurrence of this <code>TimeOfDay</code> on the given
* <code>Calendar</code>.
*
* @param calendar
* the <code>Calendar</code> to use
* @return the next occurrence of this <code>TimeOfDay</code> on the given <code>Calendar</code>
*/
public Time next(final Calendar calendar)
{
// Get this time of day today
final Time timeToday = Time.valueOf(calendar, this);
// If it has already passed
if (timeToday.before(Time.now()))
{
// Return the time tomorrow
return Time.valueOf(calendar, this).add(Duration.ONE_DAY);
}
else
{
// Time hasn't happened yet today
return timeToday;
}
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Retrieves the next occurrence of this <code>TimeOfDay</code> on the given
* <code>Calendar</code>.
*
* @param calendar
* the <code>Calendar</code> to use
* @return the next occurrence of this <code>TimeOfDay</code> on the given
* <code>Calendar</code>
*/
public Time next(final Calendar calendar)
{
// Get this time of day today
final Time timeToday = Time.valueOf(calendar, this);
// If it has already passed
if (timeToday.before(Time.now()))
{
// Return the time tomorrow
return Time.valueOf(calendar, this).add(Duration.ONE_DAY);
}
else
{
// Time hasn't happened yet today
return timeToday;
}
}
代码示例来源:origin: apache/wicket
setDateHeader("Expires", now.add(duration));
代码示例来源:origin: org.apache.wicket/wicket-request
setDateHeader("Expires", now.add(duration));
内容来源于网络,如有侵权,请联系作者删除!