afreechart/src/main/java/org/afree/chart/axis/DateTickUnit.java
/**
     * A utility method that is used internally to convert the old unit
     * constants into the corresponding enumerated value.
     *
     * @param unit  the unit specified using the deprecated integer codes.
     *
     * @return The unit type.
     *
     * @since JFreeChart 1.0.13
     */
A utility method that is used internally to convert the old unit
constants into the corresponding enumerated value.

@param unit  the unit specified using the deprecated integer codes.

@return The unit type.


A utility method that is used internally to convert the old unit constants into the corresponding enumerated value . @param unit the unit specified using the deprecated integer codes . @return The unit type .
private static DateTickUnitType intToUnitType(int unit) {
        switch (unit) {
            case YEAR: return DateTickUnitType.YEAR;
            case MONTH: return DateTickUnitType.MONTH;
            case DAY: return DateTickUnitType.DAY;
            case HOUR: return DateTickUnitType.HOUR;
            case MINUTE: return DateTickUnitType.MINUTE;
            case SECOND: return DateTickUnitType.SECOND;
            case MILLISECOND: return DateTickUnitType.MILLISECOND;
            default: throw new IllegalArgumentException(
                    "Unrecognised 'unit' value " + unit + ".");
        }
    }
private static DateTickUnitType intToUnitType ( int unit ) { switch ( unit ) { case YEAR : return DateTickUnitType . YEAR ; case MONTH : return DateTickUnitType . MONTH ; case DAY : return DateTickUnitType . DAY ; case HOUR : return DateTickUnitType . HOUR ; case MINUTE : return DateTickUnitType . MINUTE ; case SECOND : return DateTickUnitType . SECOND ; case MILLISECOND : return DateTickUnitType . MILLISECOND ; default : throw new IllegalArgumentException ( "Unrecognised 'unit' value " + unit + "." ) ; } }
A utility method that is used internally to convert the old unit
 constants into the corresponding enumerated value.
A utility method that is used internally to convert the old unit constants into the corresponding enumerated value .