Example usage for org.jfree.data.time Year next

List of usage examples for org.jfree.data.time Year next

Introduction

In this page you can find the example usage for org.jfree.data.time Year next.

Prototype

@Override
public RegularTimePeriod next() 

Source Link

Document

Returns the year following this one.

Usage

From source file:org.jfree.data.time.YearTest.java

/**
 * Some checks for the testNext() method.
 *///from   w w w .ja v a2 s.  c o m
@Test
public void testNext() {
    Year y = new Year(2000);
    y = (Year) y.next();
    assertEquals(2001, y.getYear());
    y = new Year(9999);
    assertNull(y.next());
}

From source file:org.jfree.data.time.YearTest.java

/**
 * Set up a year equal to 1900.  Request the next year, it should be 1901.
 *///from   w ww.  java  2  s .c  om
@Test
public void test1900Next() {
    Year current = new Year(1900);
    Year next = (Year) current.next();
    assertEquals(1901, next.getYear());
}

From source file:org.jfree.data.time.YearTest.java

/**
 * Set up a year equal to 9999.  Request the next year, it should be null.
 *///from  w w w.  j ava2  s . c  o m
@Test
public void test9999Next() {
    Year current = new Year(9999);
    Year next = (Year) current.next();
    assertNull(next);
}