本文整理汇总了Java中org.jfree.date.MonthConstants.DECEMBER属性的典型用法代码示例。如果您正苦于以下问题:Java MonthConstants.DECEMBER属性的具体用法?Java MonthConstants.DECEMBER怎么用?Java MonthConstants.DECEMBER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jfree.date.MonthConstants
的用法示例。
在下文中一共展示了MonthConstants.DECEMBER属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: previous
/**
* Returns the month preceding this one.
*
* @return The month preceding this one.
*/
public RegularTimePeriod previous() {
Month result;
if (this.month != MonthConstants.JANUARY) {
result = new Month(this.month - 1, this.year);
}
else {
if (this.year > 1900) {
result = new Month(MonthConstants.DECEMBER, this.year - 1);
}
else {
result = null;
}
}
return result;
}
示例2: next
/**
* Returns the month following this one.
*
* @return The month following this one.
*/
public RegularTimePeriod next() {
Month result;
if (this.month != MonthConstants.DECEMBER) {
result = new Month(this.month + 1, this.year);
}
else {
if (this.year < 9999) {
result = new Month(MonthConstants.JANUARY, this.year + 1);
}
else {
result = null;
}
}
return result;
}
示例3: previous
/**
* Returns the month preceding this one. Note that the returned
* {@link Month} is "pegged" using the default time-zone, irrespective of
* the time-zone used to peg of the current month (which is not recorded
* anywhere). See the {@link #peg(Calendar)} method.
*
* @return The month preceding this one.
*/
@Override
public RegularTimePeriod previous() {
Month result;
if (this.month != MonthConstants.JANUARY) {
result = new Month(this.month - 1, this.year);
}
else {
if (this.year > 1900) {
result = new Month(MonthConstants.DECEMBER, this.year - 1);
}
else {
result = null;
}
}
return result;
}
示例4: next
/**
* Returns the month following this one. Note that the returned
* {@link Month} is "pegged" using the default time-zone, irrespective of
* the time-zone used to peg of the current month (which is not recorded
* anywhere). See the {@link #peg(Calendar)} method.
*
* @return The month following this one.
*/
@Override
public RegularTimePeriod next() {
Month result;
if (this.month != MonthConstants.DECEMBER) {
result = new Month(this.month + 1, this.year);
}
else {
if (this.year < 9999) {
result = new Month(MonthConstants.JANUARY, this.year + 1);
}
else {
result = null;
}
}
return result;
}
示例5: previous
/**
* Returns the month preceding this one. Note that the returned
* {@link Month} is "pegged" using the default time-zone, irrespective of
* the time-zone used to peg of the current month (which is not recorded
* anywhere). See the {@link #peg(Calendar)} method.
*
* @return The month preceding this one.
*/
public RegularTimePeriod previous() {
Month result;
if (this.month != MonthConstants.JANUARY) {
result = new Month(this.month - 1, this.year);
}
else {
if (this.year > 1900) {
result = new Month(MonthConstants.DECEMBER, this.year - 1);
}
else {
result = null;
}
}
return result;
}
示例6: next
/**
* Returns the month following this one. Note that the returned
* {@link Month} is "pegged" using the default time-zone, irrespective of
* the time-zone used to peg of the current month (which is not recorded
* anywhere). See the {@link #peg(Calendar)} method.
*
* @return The month following this one.
*/
public RegularTimePeriod next() {
Month result;
if (this.month != MonthConstants.DECEMBER) {
result = new Month(this.month + 1, this.year);
}
else {
if (this.year < 9999) {
result = new Month(MonthConstants.JANUARY, this.year + 1);
}
else {
result = null;
}
}
return result;
}
示例7: setUp
/**
* Common test setup.
*/
protected void setUp() {
this.jan1900 = new Month(MonthConstants.JANUARY, 1900);
this.feb1900 = new Month(MonthConstants.FEBRUARY, 1900);
this.nov9999 = new Month(MonthConstants.NOVEMBER, 9999);
this.dec9999 = new Month(MonthConstants.DECEMBER, 9999);
}
示例8: test31Dec9999Previous
/**
* Set up a day equal to 31 December 9999. Request the previous day, it
* should be 30 December 9999.
*/
public void test31Dec9999Previous() {
Day dec31st9999 = new Day(31, MonthConstants.DECEMBER, 9999);
Day previous = (Day) dec31st9999.previous();
assertEquals(30, previous.getDayOfMonth());
}
示例9: test31Dec9999Next
/**
* Set up a day equal to 31 December 9999. Request the next day, it should
* be null.
*/
public void test31Dec9999Next() {
Day dec31st9999 = new Day(31, MonthConstants.DECEMBER, 9999);
Day next = (Day) dec31st9999.next();
assertNull(next);
}
示例10: testLastHourPrevious
/**
* Set up an hour equal to hour zero, 1 January 1900. Request the previous
* hour, it should be null.
*/
public void testLastHourPrevious() {
Hour last = new Hour(23, new Day(31, MonthConstants.DECEMBER, 9999));
Hour previous = (Hour) last.previous();
assertEquals(22, previous.getHour());
assertEquals(9999, previous.getYear());
}
示例11: testLastHourNext
/**
* Set up an hour equal to hour zero, 1 January 1900. Request the next
* hour, it should be null.
*/
public void testLastHourNext() {
Hour last = new Hour(23, new Day(31, MonthConstants.DECEMBER, 9999));
Hour next = (Hour) last.next();
assertNull(next);
}
示例12: setUp
/**
* Common test setup.
*/
@Before
public void setUp() {
this.jan1900 = new Month(MonthConstants.JANUARY, 1900);
this.feb1900 = new Month(MonthConstants.FEBRUARY, 1900);
this.nov9999 = new Month(MonthConstants.NOVEMBER, 9999);
this.dec9999 = new Month(MonthConstants.DECEMBER, 9999);
}
示例13: test31Dec9999Previous
/**
* Set up a day equal to 31 December 9999. Request the previous day, it
* should be 30 December 9999.
*/
@Test
public void test31Dec9999Previous() {
Day dec31st9999 = new Day(31, MonthConstants.DECEMBER, 9999);
Day previous = (Day) dec31st9999.previous();
assertEquals(30, previous.getDayOfMonth());
}
示例14: test31Dec9999Next
/**
* Set up a day equal to 31 December 9999. Request the next day, it should
* be null.
*/
@Test
public void test31Dec9999Next() {
Day dec31st9999 = new Day(31, MonthConstants.DECEMBER, 9999);
Day next = (Day) dec31st9999.next();
assertNull(next);
}
示例15: testLastHourPrevious
/**
* Set up an hour equal to hour zero, 1 January 1900. Request the previous
* hour, it should be null.
*/
@Test
public void testLastHourPrevious() {
Hour last = new Hour(23, new Day(31, MonthConstants.DECEMBER, 9999));
Hour previous = (Hour) last.previous();
assertEquals(22, previous.getHour());
assertEquals(9999, previous.getYear());
}