Example usage for org.jfree.date SerialDate SERIAL_UPPER_BOUND

List of usage examples for org.jfree.date SerialDate SERIAL_UPPER_BOUND

Introduction

In this page you can find the example usage for org.jfree.date SerialDate SERIAL_UPPER_BOUND.

Prototype

int SERIAL_UPPER_BOUND

To view the source code for org.jfree.date SerialDate SERIAL_UPPER_BOUND.

Click Source Link

Document

The serial number for 31 December 9999.

Usage

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

/**
 * Returns the day following this one, or <code>null</code> if some limit
 * has been reached./*from  ww w.ja  va 2s . com*/
 *
 * @return The day following this one, or <code>null</code> if some limit
 *         has been reached.
 */
@Override
public RegularTimePeriod next() {
    Day result;
    int serial = this.serialDate.toSerial();
    if (serial < SerialDate.SERIAL_UPPER_BOUND) {
        SerialDate tomorrow = SerialDate.createInstance(serial + 1);
        return new Day(tomorrow);
    } else {
        result = null;
    }
    return result;
}