本文整理了Java中org.jfree.data.time.Hour.peg()
方法的一些代码示例,展示了Hour.peg()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hour.peg()
方法的具体详情如下:
包路径:org.jfree.data.time.Hour
类名称:Hour
方法名:peg
[英]Recalculates the start date/time and end date/time for this time period relative to the supplied calendar (which incorporates a time zone).
[中]相对于提供的日历(包含时区),重新计算此时间段的开始日期/时间和结束日期/时间。
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Constructs a new Hour.
*
* @param hour the hour (in the range 0 to 23).
* @param day the day (<code>null</code> not permitted).
*/
public Hour(int hour, Day day) {
if (day == null) {
throw new IllegalArgumentException("Null 'day' argument.");
}
this.hour = (byte) hour;
this.day = day;
peg(Calendar.getInstance());
}
代码示例来源:origin: jfree/jfreechart
/**
* Constructs a new Hour.
*
* @param hour the hour (in the range 0 to 23).
* @param day the day ({@code null} not permitted).
*/
public Hour(int hour, Day day) {
Args.nullNotPermitted(day, "day");
this.hour = (byte) hour;
this.day = day;
peg(Calendar.getInstance());
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Constructs a new instance, based on the supplied date/time evaluated
* in the specified time zone.
*
* @param time the date-time (<code>null</code> not permitted).
* @param zone the time zone (<code>null</code> not permitted).
* @param locale the locale (<code>null</code> not permitted).
*
* @since 1.0.13
*/
public Hour(Date time, TimeZone zone, Locale locale) {
if (time == null) {
throw new IllegalArgumentException("Null 'time' argument.");
}
if (zone == null) {
throw new IllegalArgumentException("Null 'zone' argument.");
}
if (locale == null) {
throw new IllegalArgumentException("Null 'locale' argument.");
}
Calendar calendar = Calendar.getInstance(zone, locale);
calendar.setTime(time);
this.hour = (byte) calendar.get(Calendar.HOUR_OF_DAY);
this.day = new Day(time, zone, locale);
peg(calendar);
}
代码示例来源:origin: jfree/jfreechart
/**
* Constructs a new instance, based on the supplied date/time evaluated
* in the specified time zone.
*
* @param time the date-time ({@code null} not permitted).
* @param zone the time zone ({@code null} not permitted).
* @param locale the locale ({@code null} not permitted).
*
* @since 1.0.13
*/
public Hour(Date time, TimeZone zone, Locale locale) {
Args.nullNotPermitted(time, "time");
Args.nullNotPermitted(zone, "zone");
Args.nullNotPermitted(locale, "locale");
Calendar calendar = Calendar.getInstance(zone, locale);
calendar.setTime(time);
this.hour = (byte) calendar.get(Calendar.HOUR_OF_DAY);
this.day = new Day(time, zone, locale);
peg(calendar);
}
内容来源于网络,如有侵权,请联系作者删除!